diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index c7f633b6c91..00fa88fdc71 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -90,6 +90,8 @@ test.describe('Domains', () => { test.slow(true); test.beforeAll('Setup pre-requests', async ({ browser }) => { + test.slow(true); + const { apiContext, afterAction } = await performAdminLogin(browser); await user.create(apiContext); await classification.create(apiContext); @@ -116,6 +118,8 @@ test.describe('Domains', () => { }); test.afterAll('Cleanup', async ({ browser }) => { + test.slow(true); + const { apiContext, afterAction } = await performAdminLogin(browser); await user.delete(apiContext); await classification.delete(apiContext); @@ -899,6 +903,10 @@ test.describe('Data Consumer Domain Ownership', () => { await sidebarClick(dataConsumerPage, SidebarItem.DOMAIN); await selectDomain(dataConsumerPage, testResources.domainForTest.data); + await dataConsumerPage.locator('[data-testid="loader"]').waitFor({ + state: 'detached', + }); + await dataConsumerPage.getByTestId('domain-details-add-button').click(); // check Data Products menu item is visible diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts index 709dbf57c20..d87678765a7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts @@ -47,13 +47,14 @@ test.use({ storageState: 'playwright/.auth/admin.json' }); test.beforeEach(async ({ page }) => { await redirectToHomePage(page); + await settingClick(page, GlobalSettingOptions.ROLES); + await page.waitForSelector('[data-testid="loader"]', { state: 'detached' }); }); test('Roles page should work properly', async ({ page }) => { test.slow(true); await test.step('Add new role and check all tabs data', async () => { - await settingClick(page, GlobalSettingOptions.ROLES); await page.locator('[data-testid="add-role"]').click(); // Asserting navigation @@ -124,7 +125,6 @@ test('Roles page should work properly', async ({ page }) => { }); await test.step('Add new role without selecting data', async () => { - await settingClick(page, GlobalSettingOptions.ROLES); await page.locator('[data-testid="add-role"]').click(); // Asserting navigation @@ -299,7 +299,9 @@ test('Delete role action from manage button options', async ({ page }) => { await role.create(apiContext, policies); - await settingClick(page, GlobalSettingOptions.ROLES); + await page.reload(); + + await page.waitForSelector('[data-testid="loader"]', { state: 'detached' }); await page.waitForLoadState('networkidle'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts index 3f5eae2a7fd..f57dce6796e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -140,6 +140,9 @@ export const selectSubDomain = async ( ); await page.getByTestId(subDomain.name).click(); await res; + + await page.waitForLoadState('networkidle'); + await page.locator('[data-testid="loader"]').waitFor({ state: 'detached' }); }; export const selectDataProductFromTab = async (