mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 01:41:31 +00:00
Update Playwright, improve E2E test reliability, add scripts to deploy test resources (#1857)
This commit is contained in:
committed by
GitHub
parent
736731474f
commit
417ef899f0
@@ -23,6 +23,11 @@ const initTestExplorer = async (): Promise<void> => {
|
||||
const databaseAccount = await get(subscriptionId, resourceGroup, accountName);
|
||||
const keys = await listKeys(subscriptionId, resourceGroup, accountName);
|
||||
|
||||
// Disable the quickstart carousel.
|
||||
if (databaseAccount?.id) {
|
||||
localStorage.setItem(databaseAccount.id, "true");
|
||||
}
|
||||
|
||||
const initTestExplorerContent = {
|
||||
inputs: {
|
||||
databaseAccount: databaseAccount,
|
||||
@@ -65,6 +70,10 @@ const initTestExplorer = async (): Promise<void> => {
|
||||
// This simulates the same action that happens in the portal
|
||||
console.dir(event.data);
|
||||
if (event.data?.kind === "ready") {
|
||||
if (!iframe.contentWindow || !iframe.contentDocument) {
|
||||
throw new Error("iframe is not loaded");
|
||||
}
|
||||
|
||||
iframe.contentWindow.postMessage(
|
||||
{
|
||||
signature: "pcIframe",
|
||||
@@ -78,6 +87,7 @@ const initTestExplorer = async (): Promise<void> => {
|
||||
);
|
||||
iframe.id = "explorerMenu";
|
||||
iframe.name = "explorer";
|
||||
iframe.setAttribute("data-test", "DataExplorerFrame");
|
||||
iframe.classList.add("iframe");
|
||||
iframe.title = "explorer";
|
||||
iframe.src = iframeSrc;
|
||||
|
||||
Reference in New Issue
Block a user