diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts index a7a7982a7a9..5447cc5b200 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts @@ -46,7 +46,11 @@ export const validateLeftSidebarWithHiddenItems = async ( ) => { for (const item of Object.values(SidebarItem)) { // Dropdown items are handled differently - if (item === SidebarItem.OBSERVABILITY || item === SidebarItem.GOVERNANCE) { + if ( + item === SidebarItem.OBSERVABILITY || + item === SidebarItem.GOVERNANCE || + item === SidebarItem.DOMAINS + ) { await expect(page.getByTestId(item)).toBeVisible(); } else { const items = SIDEBAR_LIST_ITEMS[item as keyof typeof SIDEBAR_LIST_ITEMS]; 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 3a777af307a..a87f04c5155 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts @@ -49,18 +49,18 @@ const waitForAssetModalInitialLoad = async (page: Page) => { const waitForSearchDebounce = async (page: Page) => { // Wait for loader to appear and disappear after search // This ensures search debounce completed and results are stable - await page - .waitForSelector('[data-testid="loader"]', { + try { + await page.waitForSelector('[data-testid="loader"]', { state: 'attached', timeout: 999, - }) - .catch(() => { - // Loader might not appear if search is very fast }); - - await page.waitForSelector('[data-testid="loader"]', { - state: 'detached', - }); + await page.waitForSelector('[data-testid="loader"]', { + state: 'detached', + }); + } catch (e) { + // Loader never appeared - search was instant, which is fine + // Just continue without waiting + } }; export const assignDomain = async (page: Page, domain: Domain['data']) => {