Playwright: fixed Tags AUT test (#17852)

This commit is contained in:
Shailesh Parmar 2024-09-16 18:00:12 +05:30 committed by GitHub
parent 9a96ddd4ae
commit e78450a5ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -297,10 +297,14 @@ test('Classification Page', async ({ page }) => {
const getTags = page.waitForResponse('/api/v1/tags*');
await sidebarClick(page, SidebarItem.TAGS);
await getTags;
const classificationResponse = page.waitForResponse(
`/api/v1/tags?*parent=${encodeURIComponent(NEW_CLASSIFICATION.name)}*`
);
await page
.locator(`[data-testid="side-panel-classification"]`)
.filter({ hasText: NEW_CLASSIFICATION.displayName })
.click();
await classificationResponse;
await expect(page.locator('.activeCategory')).toContainText(
NEW_CLASSIFICATION.displayName
@ -324,10 +328,14 @@ test('Classification Page', async ({ page }) => {
const getTags = page.waitForResponse('/api/v1/tags*');
await sidebarClick(page, SidebarItem.TAGS);
await getTags;
const classificationResponse = page.waitForResponse(
`/api/v1/tags?*parent=${encodeURIComponent(NEW_CLASSIFICATION.name)}*`
);
await page
.locator(`[data-testid="side-panel-classification"]`)
.filter({ hasText: NEW_CLASSIFICATION.displayName })
.click();
await classificationResponse;
await expect(page.locator('.activeCategory')).toContainText(
NEW_CLASSIFICATION.displayName