fix playwright redshift delete entity failure (#17743)

* fix playwright redshift delete entity failure

* fix landing page kpi failure

* fix delete service issue

* fix flaky for AddRoleAndAssignToUSer
This commit is contained in:
Chirag Madlani 2024-09-06 17:32:53 +05:30 committed by GitHub
parent dcad829a80
commit b9ef8cae30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View File

@ -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"]');

View File

@ -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 }) => {

View File

@ -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!`);