From 7c826484aeeb2c148e48794e020aebcd91a2f81d Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Fri, 2 Jan 2026 14:37:48 -0500 Subject: [PATCH] for scale & settings, dismiss overlay if appears --- test/fx.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/fx.ts b/test/fx.ts index 393eb59d7..24c3a44ed 100644 --- a/test/fx.ts +++ b/test/fx.ts @@ -59,6 +59,7 @@ export const TEST_AUTOSCALE_THROUGHPUT_RU = 1000; export const TEST_AUTOSCALE_MAX_THROUGHPUT_RU_2K = 2000; export const TEST_MANUAL_THROUGHPUT_RU_2K = 2000; export const ONE_MINUTE_MS: number = 60 * 1000; +export const ONE_SECOND_MS: number = 1000; function tryGetStandardName(accountType: TestAccount) { if (process.env.DE_TEST_ACCOUNT_PREFIX) { @@ -473,6 +474,30 @@ export class DataExplorer { `TreeNode:${context.database.id}/${context.container.id}/Scale & Settings`, ); await scaleAndSettingsButton.click(); + + // // Wait for the Scale & Settings tab to open + // const scaleAndSettingsTab = this.frame.getByRole("tab", { name: `${context.container.id}.Scale & Settings` }); + // await scaleAndSettingsTab.waitFor({ + // timeout: ONE_MINUTE_MS, + // }); + // Dismiss overlay if it appears + const overlay = this.frame.locator("#webpack-dev-server-client-overlay").first(); + + for (let attempt = 0; attempt < 5; attempt++) { + await scaleAndSettingsButton.click(); + + try { + // Give it up to 30s to show up + await overlay.waitFor({ state: "visible", timeout: 15 * ONE_SECOND_MS }); + + // Overlay appeared => dismiss and retry + await overlay.contentFrame().getByLabel("Dismiss").click(); + continue; + } catch { + // Overlay did not appear within 30s => success + break; + } + } } /** Gets the console message element */