mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 20:51:26 +00:00
fix tag page flaky playwright test (#19150)
* fix tag page flaky playwright failures * removed commented code
This commit is contained in:
parent
24b668a642
commit
ceeba2ad75
@ -66,6 +66,7 @@ export class TagClass {
|
|||||||
async visitPage(page: Page) {
|
async visitPage(page: Page) {
|
||||||
await visitClassificationPage(
|
await visitClassificationPage(
|
||||||
page,
|
page,
|
||||||
|
this.responseData.classification.name,
|
||||||
this.responseData.classification.displayName
|
this.responseData.classification.displayName
|
||||||
);
|
);
|
||||||
await page.getByTestId(this.data.name).click();
|
await page.getByTestId(this.data.name).click();
|
||||||
|
@ -39,23 +39,26 @@ export const TAG_INVALID_NAMES = {
|
|||||||
|
|
||||||
export const visitClassificationPage = async (
|
export const visitClassificationPage = async (
|
||||||
page: Page,
|
page: Page,
|
||||||
classificationName: string
|
classificationName: string,
|
||||||
|
classificationDisplayName: string
|
||||||
) => {
|
) => {
|
||||||
await redirectToHomePage(page);
|
await redirectToHomePage(page);
|
||||||
const classificationResponse = page.waitForResponse(
|
const classificationResponse = page.waitForResponse(
|
||||||
'/api/v1/classifications?**'
|
'/api/v1/classifications?**'
|
||||||
);
|
);
|
||||||
const fetchTags = page.waitForResponse('/api/v1/tags?*parent=*');
|
const fetchTags = page.waitForResponse(
|
||||||
|
`/api/v1/tags?*parent=${classificationName}**`
|
||||||
|
);
|
||||||
await sidebarClick(page, SidebarItem.TAGS);
|
await sidebarClick(page, SidebarItem.TAGS);
|
||||||
await classificationResponse;
|
await classificationResponse;
|
||||||
|
|
||||||
await page
|
await page
|
||||||
.locator(`[data-testid="side-panel-classification"]`)
|
.getByTestId('data-summary-container')
|
||||||
.filter({ hasText: classificationName })
|
.getByText(classificationDisplayName)
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await expect(page.locator('.activeCategory')).toContainText(
|
await expect(page.locator('.activeCategory')).toContainText(
|
||||||
classificationName
|
classificationDisplayName
|
||||||
);
|
);
|
||||||
|
|
||||||
await fetchTags;
|
await fetchTags;
|
||||||
@ -351,7 +354,7 @@ export const editTagPageDescription = async (page: Page, tag: TagClass) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const verifyCertificationTagPageUI = async (page: Page) => {
|
export const verifyCertificationTagPageUI = async (page: Page) => {
|
||||||
await visitClassificationPage(page, 'Certification');
|
await visitClassificationPage(page, 'Certification', 'Certification');
|
||||||
const res = page.waitForResponse(`/api/v1/tags/name/*`);
|
const res = page.waitForResponse(`/api/v1/tags/name/*`);
|
||||||
await page.getByTestId('Gold').click();
|
await page.getByTestId('Gold').click();
|
||||||
await res;
|
await res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user