From 47d285abe5302ff20adbe66b89aae64396752f63 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 5 Mar 2025 15:37:30 +0530 Subject: [PATCH] playwright: fixed flakiness in incident manager test (#20057) --- .../ui/playwright/e2e/Features/IncidentManager.spec.ts | 2 +- openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts index 6da975a77e0..7ef45fb8337 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts @@ -44,7 +44,7 @@ test.describe.configure({ mode: 'serial' }); test.describe('Incident Manager', PLAYWRIGHT_INGESTION_TAG_OBJ, () => { test.beforeAll(async ({ browser }) => { // since we need to poll for the pipeline status, we need to increase the timeout - test.setTimeout(90000); + test.slow(); const { afterAction, apiContext, page } = await createNewPage(browser); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts index 47fd6decdbf..ea8deb64936 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts @@ -226,13 +226,13 @@ export const resetTokenFromBotPage = async ( testId: string; } ) => { + const settingClickResponse = page.waitForResponse('api/v1/bots?*'); await settingClick(page, GlobalSettingOptions.BOTS); + await settingClickResponse; await page.getByTestId('searchbar').click(); await page.getByTestId('searchbar').fill(bot.name); - await expect(page.getByTestId(bot.testId)).toBeVisible(); - await page.getByTestId(bot.testId).click(); await expect(page.getByTestId('revoke-button')).toBeVisible();