diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/AddRoleAndAssignToUser.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/AddRoleAndAssignToUser.spec.ts index 5f8583dae0b7..bf6b6e042114 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/AddRoleAndAssignToUser.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/AddRoleAndAssignToUser.spec.ts @@ -100,8 +100,13 @@ test.describe.serial('Add role and assign it to the user', () => { test('Verify assigned role to new user', async ({ page }) => { await settingClick(page, GlobalSettingOptions.USERS); + const searchUser = page.waitForResponse( + `/api/v1/search/query?q=*${encodeURIComponent(userDisplayName)}*` + ); await page.waitForSelector('[data-testid="searchbar"]'); await page.fill('[data-testid="searchbar"]', userDisplayName); + + await searchUser; await page.waitForSelector(`[data-testid="${userName}"]`); await page.click(`[data-testid="${userName}"]`); await page.waitForSelector('[data-testid="user-profile"]'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts index 8190bf9a1899..ad1f505649b0 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts @@ -169,12 +169,14 @@ test.describe('Data Insight Page', { tag: '@data-insight' }, () => { await redirectToHomePage(page); await kpiResponse; + + await page.waitForSelector('[data-testid="loader"]', { state: 'detached' }); expect(page.locator('[data-testid="kpi-widget"]')).toBeVisible(); // description and owner data to be visible - expect(page.getByTestId(DESCRIPTION_WITH_PERCENTAGE)).toBeVisible(); - expect(page.getByTestId(DESCRIPTION_WITH_OWNER)).toBeVisible(); + await expect(page.getByTestId(DESCRIPTION_WITH_PERCENTAGE)).toBeVisible(); + await expect(page.getByTestId(DESCRIPTION_WITH_OWNER)).toBeVisible(); }); test('Delete Kpi', async ({ page }) => { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts index 20648f6a4d31..211222a7d8a8 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts @@ -93,8 +93,18 @@ export const deleteService = async ( await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); + const deleteResponse = page.waitForResponse((response) => + response + .url() + .includes( + `/api/v1/services/${getServiceCategoryFromService(typeOfService)}` + ) + ); + await page.click('[data-testid="confirm-button"]'); + await deleteResponse; + // Closing the toast notification await toastNotification(page, `"${serviceName}" deleted successfully!`);