diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ExploreSortOrderFilter.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ExploreSortOrderFilter.spec.ts index 4ebb5742068..313ee338649 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ExploreSortOrderFilter.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ExploreSortOrderFilter.spec.ts @@ -36,6 +36,7 @@ const creationConfig: EntityDataClassCreationConfig = { apiEndpoint: true, database: true, databaseSchema: true, + metric: true, }; test.describe('Explore Sort Order Filter', () => { @@ -75,12 +76,30 @@ test.describe('Explore Sort Order Filter', () => { } ); + await page.waitForSelector(`[data-testid="${filter}-checkbox"]`, { + state: 'visible', + }); await page.getByTestId(`${filter}-checkbox`).check(); await page.getByTestId('update-btn').click(); await selectSortOrder(page, 'Name'); await verifyEntitiesAreSorted(page); + await page.getByRole('button', { name: 'Data Assets' }).click(); + + await page.waitForSelector( + 'data-testid="drop-down-menu" data-testid="loader"', + { + state: 'detached', + } + ); + + await page.waitForSelector(`[data-testid="${filter}-checkbox"]`, { + state: 'visible', + }); + await page.getByTestId(`${filter}-checkbox`).uncheck(); + await page.getByTestId('update-btn').click(); + await afterAction(); }); }); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts index 4998ee511a7..2fef6141267 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts @@ -159,7 +159,12 @@ test.describe('Entity Version pages', () => { test.slow(); await entity.visitEntityPage(page); - const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); + + await page.waitForLoadState('networkidle'); + const versionDetailResponse = page.waitForResponse( + (response) => + response.url().includes('/versions/0.2') && response.status() === 200 + ); await page.locator('[data-testid="version-button"]').click(); await versionDetailResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts index 46a9737cfec..032c147e03a 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.interface.ts @@ -34,4 +34,5 @@ export interface EntityDataClassCreationConfig { pipelineService?: boolean; searchIndexService?: boolean; storageService?: boolean; + metric?: boolean; } diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts index d5eb00f1b2c..b81f049def8 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts @@ -127,7 +127,6 @@ export class EntityDataClass { this.certificationTag1.create(apiContext), this.certificationTag2.create(apiContext), this.classification1.create(apiContext), - this.metric1.create(apiContext), ] : []; @@ -205,6 +204,9 @@ export class EntityDataClass { if (creationConfig?.all || creationConfig?.storageService) { promises.push(this.storageService.create(apiContext)); } + if (creationConfig?.all || creationConfig?.metric) { + promises.push(this.metric1.create(apiContext)); + } await Promise.allSettled(promises); @@ -246,7 +248,6 @@ export class EntityDataClass { this.dataProduct1.delete(apiContext), this.dataProduct2.delete(apiContext), this.dataProduct3.delete(apiContext), - this.metric1.delete(apiContext), ] : []; @@ -324,6 +325,9 @@ export class EntityDataClass { if (creationConfig?.all || creationConfig?.storageService) { promises.push(this.storageService.delete(apiContext)); } + if (creationConfig?.all || creationConfig?.metric) { + promises.push(this.metric1.delete(apiContext)); + } return await Promise.allSettled(promises); } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx index ce46b974f0c..216cf8174f6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx @@ -410,10 +410,14 @@ export const DashboardChartTable = ({ }, [listChartIds, isCustomizationPage, initializeCharts]); useEffect(() => { - setFilters({ - showDeletedCharts: - chartFilters.showDeletedCharts ?? dashboardDetails?.deleted, - }); + const newShowDeletedValue = + chartFilters.showDeletedCharts ?? dashboardDetails?.deleted; + // Only update if the value actually changed to prevent unnecessary navigation + if (chartFilters.showDeletedCharts !== newShowDeletedValue) { + setFilters({ + showDeletedCharts: newShowDeletedValue, + }); + } }, [dashboardDetails?.deleted, chartFilters.showDeletedCharts, setFilters]); return (