fix the tags playwright test (#23544)

This commit is contained in:
Ashish Gupta 2025-09-25 10:35:28 +05:30 committed by GitHub
parent 4768c00fcf
commit 7334f529e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 4 deletions

View File

@ -384,6 +384,12 @@ test('Classification Page', async ({ page }) => {
await page.reload();
await databaseSchemasPage;
await page.waitForLoadState('networkidle');
await page.waitForSelector('[data-testid="loader"]', {
state: 'detached',
});
await expect(
page.locator('[data-testid="tags-container"]')
).toContainText(tag);
@ -441,6 +447,11 @@ test('Classification Page', async ({ page }) => {
// Verify term count is now 0 after deleting the tag
await page.reload();
await page.waitForLoadState('networkidle');
await page.waitForSelector('[data-testid="loader"]', {
state: 'detached',
});
await page.waitForSelector('[data-testid="side-panel-classification"]', {
state: 'visible',
});

View File

@ -43,11 +43,13 @@ export class ClassificationClass {
}
async visitPage(page: Page) {
const getClassification = page.waitForResponse('/api/v1/classifications**');
const getTags = page.waitForResponse('/api/v1/tags**');
await sidebarClick(page, SidebarItem.TAGS);
const getTags = page.waitForResponse('/api/v1/tags*');
await page.waitForSelector('[data-testid="side-panel-classification"]');
await getClassification;
await getTags;
await page.waitForSelector('[data-testid="side-panel-classification"]');
await page
.locator(`[data-testid="side-panel-classification"]`)
.filter({ hasText: this.data.displayName })

View File

@ -108,7 +108,7 @@ const TagPage = () => {
tab?: string;
}>();
const { permissions, getEntityPermission } = usePermissionProvider();
const [isLoading, setIsLoading] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [tagItem, setTagItem] = useState<Tag>();
const [assetModalVisible, setAssetModalVisible] = useState(false);