Skip to content

Commit

Permalink
Fix the flakiness in observabilityAlert and EntityDataConsumer specs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketkatkar97 authored Sep 20, 2024
1 parent 1e56c76 commit 564c16b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ test.describe('Observability Alert Flow', () => {
test(`${sourceDisplayName} alert`, async ({ page }) => {
const ALERT_NAME = generateAlertName();

test.slow(true);

await test.step('Create alert', async () => {
await inputBasicAlertInformation({
page,
Expand Down
40 changes: 40 additions & 0 deletions openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ export const assignTag = async (
await searchTags;
await page.getByTestId(`tag-${tag}`).click();

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -393,6 +398,11 @@ export const assignTagToChildren = async ({
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -425,6 +435,11 @@ export const removeTag = async (page: Page, tags: string[]) => {
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -467,6 +482,11 @@ export const removeTagsFromChildren = async ({
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -507,6 +527,11 @@ export const assignGlossaryTerm = async (
await searchGlossaryTerm;
await page.getByTestId(`tag-${glossaryTerm.fullyQualifiedName}`).click();

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -549,6 +574,11 @@ export const assignGlossaryTermToChildren = async ({
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -585,6 +615,11 @@ export const removeGlossaryTerm = async (
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down Expand Up @@ -628,6 +663,11 @@ export const removeGlossaryTermFromChildren = async ({
(response) => response.request().method() === 'PATCH'
);

await page.waitForSelector(
'.ant-select-dropdown [data-testid="saveAssociatedTag"]',
{ state: 'visible' }
);

await expect(page.getByTestId('saveAssociatedTag')).toBeEnabled();

await page.getByTestId('saveAssociatedTag').click();
Expand Down

0 comments on commit 564c16b

Please sign in to comment.