mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-30 03:16:30 +00:00
fix(test): ExploreSortOrderFilter.spec and EntityVersionPages.spec (#23011)
* fix explore sort order test * fix entity version page test * fix load state * minor fix * fix test
This commit is contained in:
parent
abfb3a8e8a
commit
8a24e6d3a3
@ -36,6 +36,7 @@ const creationConfig: EntityDataClassCreationConfig = {
|
|||||||
apiEndpoint: true,
|
apiEndpoint: true,
|
||||||
database: true,
|
database: true,
|
||||||
databaseSchema: true,
|
databaseSchema: true,
|
||||||
|
metric: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
test.describe('Explore Sort Order Filter', () => {
|
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(`${filter}-checkbox`).check();
|
||||||
await page.getByTestId('update-btn').click();
|
await page.getByTestId('update-btn').click();
|
||||||
|
|
||||||
await selectSortOrder(page, 'Name');
|
await selectSortOrder(page, 'Name');
|
||||||
await verifyEntitiesAreSorted(page);
|
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();
|
await afterAction();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -159,7 +159,12 @@ test.describe('Entity Version pages', () => {
|
|||||||
test.slow();
|
test.slow();
|
||||||
|
|
||||||
await entity.visitEntityPage(page);
|
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 page.locator('[data-testid="version-button"]').click();
|
||||||
await versionDetailResponse;
|
await versionDetailResponse;
|
||||||
|
|
||||||
|
@ -34,4 +34,5 @@ export interface EntityDataClassCreationConfig {
|
|||||||
pipelineService?: boolean;
|
pipelineService?: boolean;
|
||||||
searchIndexService?: boolean;
|
searchIndexService?: boolean;
|
||||||
storageService?: boolean;
|
storageService?: boolean;
|
||||||
|
metric?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,6 @@ export class EntityDataClass {
|
|||||||
this.certificationTag1.create(apiContext),
|
this.certificationTag1.create(apiContext),
|
||||||
this.certificationTag2.create(apiContext),
|
this.certificationTag2.create(apiContext),
|
||||||
this.classification1.create(apiContext),
|
this.classification1.create(apiContext),
|
||||||
this.metric1.create(apiContext),
|
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
@ -205,6 +204,9 @@ export class EntityDataClass {
|
|||||||
if (creationConfig?.all || creationConfig?.storageService) {
|
if (creationConfig?.all || creationConfig?.storageService) {
|
||||||
promises.push(this.storageService.create(apiContext));
|
promises.push(this.storageService.create(apiContext));
|
||||||
}
|
}
|
||||||
|
if (creationConfig?.all || creationConfig?.metric) {
|
||||||
|
promises.push(this.metric1.create(apiContext));
|
||||||
|
}
|
||||||
|
|
||||||
await Promise.allSettled(promises);
|
await Promise.allSettled(promises);
|
||||||
|
|
||||||
@ -246,7 +248,6 @@ export class EntityDataClass {
|
|||||||
this.dataProduct1.delete(apiContext),
|
this.dataProduct1.delete(apiContext),
|
||||||
this.dataProduct2.delete(apiContext),
|
this.dataProduct2.delete(apiContext),
|
||||||
this.dataProduct3.delete(apiContext),
|
this.dataProduct3.delete(apiContext),
|
||||||
this.metric1.delete(apiContext),
|
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
@ -324,6 +325,9 @@ export class EntityDataClass {
|
|||||||
if (creationConfig?.all || creationConfig?.storageService) {
|
if (creationConfig?.all || creationConfig?.storageService) {
|
||||||
promises.push(this.storageService.delete(apiContext));
|
promises.push(this.storageService.delete(apiContext));
|
||||||
}
|
}
|
||||||
|
if (creationConfig?.all || creationConfig?.metric) {
|
||||||
|
promises.push(this.metric1.delete(apiContext));
|
||||||
|
}
|
||||||
|
|
||||||
return await Promise.allSettled(promises);
|
return await Promise.allSettled(promises);
|
||||||
}
|
}
|
||||||
|
@ -410,10 +410,14 @@ export const DashboardChartTable = ({
|
|||||||
}, [listChartIds, isCustomizationPage, initializeCharts]);
|
}, [listChartIds, isCustomizationPage, initializeCharts]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setFilters({
|
const newShowDeletedValue =
|
||||||
showDeletedCharts:
|
chartFilters.showDeletedCharts ?? dashboardDetails?.deleted;
|
||||||
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]);
|
}, [dashboardDetails?.deleted, chartFilters.showDeletedCharts, setFilters]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user