fixed flaky metrics tests (#21000)

This commit is contained in:
Dhruv Parmar 2025-05-02 10:17:25 +05:30 committed by GitHub
parent 8314fdf8d0
commit defa0525c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -136,6 +136,12 @@ test.describe('Listing page and add Metric flow should work', () => {
'Track the health of your data assets with metrics.'
);
const pageSizeDropdown = page.getByTestId('page-size-selection-dropdown');
if (await pageSizeDropdown.isVisible()) {
await pageSizeDropdown.click();
await page.getByText('25 / Page').click();
}
await expect(
page.getByRole('cell', { name: 'Name', exact: true })
).toBeVisible();

View File

@ -1248,10 +1248,11 @@ export const softDeleteEntity = async (
await page.click('[data-testid="confirm-button"]');
await deleteResponse;
await page.waitForLoadState('networkidle');
await toastNotification(
page,
/deleted successfully!/,
/(deleted successfully!|Delete operation initiated)/,
BIG_ENTITY_DELETE_TIMEOUT
);
@ -1319,10 +1320,10 @@ export const hardDeleteEntity = async (
);
await page.click('[data-testid="confirm-button"]');
await deleteResponse;
await page.waitForLoadState('networkidle');
await toastNotification(
page,
/deleted successfully!/,
/(deleted successfully!|Delete operation initiated)/,
BIG_ENTITY_DELETE_TIMEOUT
);
};

View File

@ -175,6 +175,7 @@ export const updateRelatedMetric = async (
hasText: dataAsset.entity.name,
})
.click();
await page.locator('[data-testid="saveRelatedMetrics"]').click();
await patchPromise;