Skip to content

Commit

Permalink
Playwright: fixed Tags AUT test (#17852)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaileshParmar11 authored Sep 16, 2024
1 parent 9a96ddd commit e78450a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e78450a

Please sign in to comment.