From 2dfd7d1f7068fc4fb2a48455bc4c01ca2ad95aa8 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Tue, 13 Aug 2024 20:13:24 +0530 Subject: [PATCH] Minor: fixed failing test case in AUT part 1 (#17428) * Minor: fixed failing test case in AUT part 1 * fixed multiPipeline click issue due to meta pilot icon * addressing comments --- .../e2e/Features/TestSuiteMultiPipeline.spec.ts | 2 +- .../resources/ui/playwright/e2e/Flow/Tour.spec.ts | 1 + .../ui/playwright/e2e/Pages/TestCases.spec.ts | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuiteMultiPipeline.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuiteMultiPipeline.spec.ts index 9a94c003d39..fb016273d8e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuiteMultiPipeline.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuiteMultiPipeline.spec.ts @@ -202,7 +202,7 @@ test("Edit the pipeline's test case", async ({ page }) => { name: new RegExp(pipeline?.['name']), }) .getByTestId('more-actions') - .click(); + .click({ force: true }); await page .locator( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts index 1b9ad865130..ca6cbbe9286 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts @@ -24,6 +24,7 @@ test.describe('Tour should work properly', () => { test('All tour steps should work', async ({ page }) => { await page.locator('[data-testid="help-icon"]').click(); await page.getByRole('link', { name: 'Tour', exact: true }).click(); + await page.waitForURL('**/tour'); await expect(page.locator(`[data-tour-elem="badge"]`)).toHaveText('1'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestCases.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestCases.spec.ts index 91c6506b965..23674df4e52 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestCases.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestCases.spec.ts @@ -34,7 +34,14 @@ test('Table difference test case', async ({ page }) => { }; await table1.visitEntityPage(page); + const profileResponse = page.waitForResponse( + `/api/v1/tables/${encodeURIComponent( + table1.entityResponseData?.['fullyQualifiedName'] + )}/tableProfile/latest` + ); await page.getByText('Profiler & Data Quality').click(); + await profileResponse; + await page.getByRole('menuitem', { name: 'Table Profile' }).click(); try { await test.step('Create', async () => { @@ -141,7 +148,14 @@ test('Custom SQL Query', async ({ page }) => { }; await table.visitEntityPage(page); + const profileResponse = page.waitForResponse( + `/api/v1/tables/${encodeURIComponent( + table.entityResponseData?.['fullyQualifiedName'] + )}/tableProfile/latest` + ); await page.getByText('Profiler & Data Quality').click(); + await profileResponse; + await page.getByRole('menuitem', { name: 'Table Profile' }).click(); try { await test.step('Create', async () => {