Skip to content

Commit

Permalink
fix glossary tests (#19352)
Browse files Browse the repository at this point in the history
(cherry picked from commit 94cbadb)
  • Loading branch information
karanh37 authored and OpenMetadata Release Bot committed Jan 14, 2025
1 parent 2864e17 commit 25b0fb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1216,13 +1216,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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
}
};

Expand Down

0 comments on commit 25b0fb3

Please sign in to comment.