From 58fd1eb592ae2b7f429cb087d949ffdd816a65f1 Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Thu, 17 Jul 2025 19:41:03 +0530 Subject: [PATCH] Minor: Fix the AutoPilot test flakiness (#22414) * Fix the AutoPilot specs * Increase the AutoPilot timeout --- .../resources/ui/playwright/e2e/Features/AutoPilot.spec.ts | 5 ++--- .../src/main/resources/ui/playwright/utils/common.ts | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AutoPilot.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AutoPilot.spec.ts index 935548f5bbc..bfa2f76b328 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AutoPilot.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AutoPilot.spec.ts @@ -95,8 +95,8 @@ services.forEach((ServiceClass) => { test('Create Service and check the AutoPilot status', async ({ page, }) => { - // 6 minutes max for AutoPilot tests to complete agents running. - test.setTimeout(6 * 60 * 1000); + // 8 minutes max for AutoPilot tests to complete agents running. + test.setTimeout(8 * 60 * 1000); await settingClick( page, @@ -123,7 +123,6 @@ services.forEach((ServiceClass) => { '[data-testid="auto-pilot-status-banner"] [data-testid="status-banner-icon-RUNNING"] ', { state: 'visible', - timeout: 5000, } ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index d203064d939..410497a2672 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -353,6 +353,10 @@ export const closeFirstPopupAlert = async (page: Page) => { export const reloadAndWaitForNetworkIdle = async (page: Page) => { await page.reload(); await page.waitForLoadState('networkidle'); + + await page.waitForSelector('[data-testid="loader"]', { + state: 'detached', + }); }; /**