mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-06 12:36:56 +00:00
fix glossary tests (#19352)
This commit is contained in:
parent
a28c30ec7f
commit
94cbadb772
@ -1219,13 +1219,17 @@ test.describe('Glossary tests', () => {
|
||||
const firstGlossaryName = json.data[0].displayName;
|
||||
|
||||
await expect(
|
||||
page.getByRole('menuitem', { name: firstGlossaryName })
|
||||
page
|
||||
.getByTestId('glossary-left-panel')
|
||||
.getByRole('menuitem', { name: firstGlossaryName })
|
||||
).toBeVisible();
|
||||
|
||||
const lastGlossaryName = json.data[json.data.length - 1].displayName;
|
||||
|
||||
await expect(
|
||||
page.getByRole('menuitem', { name: lastGlossaryName })
|
||||
page
|
||||
.getByTestId('glossary-left-panel')
|
||||
.getByRole('menuitem', { name: lastGlossaryName })
|
||||
).toBeVisible();
|
||||
} finally {
|
||||
for (const glossary of glossaries) {
|
||||
|
||||
@ -62,11 +62,14 @@ export const selectActiveGlossary = async (
|
||||
const isSelected = await menuItem.evaluate((element) => {
|
||||
return element.classList.contains('ant-menu-item-selected');
|
||||
});
|
||||
|
||||
if (!isSelected) {
|
||||
const glossaryResponse = page.waitForResponse('/api/v1/glossaryTerms*');
|
||||
await menuItem.click();
|
||||
await glossaryResponse;
|
||||
} else {
|
||||
await page.waitForSelector('[data-testid="loader"]', {
|
||||
state: 'detached',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user