mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-29 05:41:40 +00:00
Make DataExplorerRoot as an optional check
This commit is contained in:
@@ -491,7 +491,7 @@ export class DataExplorer {
|
||||
}
|
||||
|
||||
/** Waits for the Data Explorer app to load */
|
||||
static async waitForExplorer(page: Page) {
|
||||
static async waitForExplorer(page: Page, options?: TestExplorerUrlOptions): Promise<DataExplorer> {
|
||||
const iframeElement = await page.getByTestId("DataExplorerFrame").elementHandle();
|
||||
if (iframeElement === null) {
|
||||
throw new Error("Explorer iframe not found");
|
||||
@@ -503,7 +503,9 @@ export class DataExplorer {
|
||||
throw new Error("Explorer frame not found");
|
||||
}
|
||||
|
||||
await explorerFrame?.getByTestId("DataExplorerRoot").waitFor();
|
||||
if (!options?.enablecontainercopy) {
|
||||
await explorerFrame?.getByTestId("DataExplorerRoot").waitFor();
|
||||
}
|
||||
|
||||
return new DataExplorer(explorerFrame);
|
||||
}
|
||||
@@ -523,7 +525,7 @@ export class ContainerCopy {
|
||||
) {}
|
||||
|
||||
static async waitForContainerCopy(page: Page): Promise<ContainerCopy> {
|
||||
const explorerFrame = await DataExplorer.waitForExplorer(page);
|
||||
const explorerFrame = await DataExplorer.waitForExplorer(page, { enablecontainercopy: true });
|
||||
const containerCopyWrapper = explorerFrame.frame.locator("div#containerCopyWrapper");
|
||||
return new ContainerCopy(explorerFrame.frame, containerCopyWrapper);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user