mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 19:48:17 +00:00
chore(ui): fix the flaky test around metric spec (#23181)
* fix the flaky test around metric and customize landing * reverted the customize test * reverted the unwanted changes
This commit is contained in:
parent
04a3639e47
commit
9aa194d877
@ -186,22 +186,38 @@ export const updateRelatedMetric = async (
|
||||
|
||||
// Wait for the metrics API call to complete
|
||||
const metricsResponsePromise1 = page.waitForResponse(
|
||||
'/api/v1/metrics/name/*?fields=*'
|
||||
`/api/v1/metrics/name/${dataAsset.entity.name}?fields=*`
|
||||
);
|
||||
|
||||
await page
|
||||
.getByRole('link', { name: dataAsset.entity.name, exact: true })
|
||||
.getByRole('button', { name: dataAsset.entity.name, exact: true })
|
||||
.click();
|
||||
|
||||
await metricsResponsePromise1;
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
|
||||
|
||||
await expect(page.getByTestId('entity-header-display-name')).toContainText(
|
||||
dataAsset.entity.name
|
||||
);
|
||||
|
||||
// Adding manual wait for,right panel to be in place
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// Wait for the metrics API call to complete
|
||||
const metricsResponsePromise2 = page.waitForResponse(
|
||||
'/api/v1/metrics/name/*?fields=*'
|
||||
`/api/v1/metrics/name/${title}?fields=*`
|
||||
);
|
||||
await page.getByRole('link', { name: title }).click();
|
||||
await page.getByRole('button', { name: title, exact: true }).click();
|
||||
await metricsResponsePromise2;
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
|
||||
|
||||
await expect(page.getByTestId('entity-header-display-name')).toContainText(
|
||||
title
|
||||
);
|
||||
};
|
||||
|
||||
export const addMetric = async (page: Page) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user