diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts index a998d69453e..a15c6945bde 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/AdvancedSearch.spec.ts @@ -233,7 +233,6 @@ test.describe('Advanced Search', { tag: '@advanced-search' }, () => { ], status: ['Approved', 'In Review'], tableType: [table.entity.tableType, 'MaterializedView'], - entityType: ['dashboard', 'mlmodel'], 'charts.displayName.keyword': [ EntityDataClass.dashboard1.charts.displayName, EntityDataClass.dashboard2.charts.displayName, diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts index 1f413cff776..0a2c66e1531 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManager.spec.ts @@ -49,11 +49,10 @@ test.describe('Incident Manager', PLAYWRIGHT_INGESTION_TAG_OBJ, () => { const { afterAction, apiContext, page } = await createNewPage(browser); - // Todo: Remove this patch once the issue is fixed #19140 - await resetTokenFromBotPage(page, { - name: 'testsuite', - testId: 'bot-link-TestSuiteBot', - }); + if (!process.env.PLAYWRIGHT_IS_OSS) { + // Todo: Remove this patch once the issue is fixed #19140 + await resetTokenFromBotPage(page, 'testsuite-bot'); + } for (const user of users) { await user.create(apiContext); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts index 18b9d661ce3..658a3789fd1 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/IngestionBot.spec.ts @@ -185,9 +185,9 @@ test.describe('Ingestion Bot ', () => { }); // check if service has domain or not - await expect(ingestionBotPage.getByTestId('domain-link')).toHaveText( - domain1.data.displayName - ); + await expect( + ingestionBotPage.getByTestId('domain-link').first() + ).toHaveText(domain1.data.displayName); } ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage.spec.ts index cc8d0a09f5d..a9ddc3c4c17 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage.spec.ts @@ -215,8 +215,6 @@ test('Verify column lineage between table and topic', async ({ browser }) => { 'entityResponseData.service.fullyQualifiedName' ); - const tableServiceName = get(table, 'entityResponseData.service.name'); - const topicServiceFqn = get( topic, 'entityResponseData.service.fullyQualifiedName' @@ -355,6 +353,8 @@ test('Verify column lineage between table and api endpoint', async ({ }); test('Verify function data in edge drawer', async ({ browser }) => { + test.slow(); + const { page } = await createNewPage(browser); const { apiContext, afterAction } = await getApiContext(page); const table1 = new TableClass(); @@ -414,6 +414,8 @@ test('Verify function data in edge drawer', async ({ browser }) => { await page.reload(); await lineageReq1; + await page.waitForLoadState('networkidle'); + await activateColumnLayer(page); await page .locator( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ProfilerConfigurationPage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ProfilerConfigurationPage.spec.ts index 15ea3bd1e6e..146fca59955 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ProfilerConfigurationPage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ProfilerConfigurationPage.spec.ts @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { expect, Page, test as base } from '@playwright/test'; +import { test as base, expect, Page } from '@playwright/test'; import { PROFILER_EMPTY_RESPONSE_CONFIG, PROFILER_REQUEST_CONFIG, @@ -19,7 +19,11 @@ import { SidebarItem } from '../../constant/sidebar'; import { AdminClass } from '../../support/user/AdminClass'; import { UserClass } from '../../support/user/UserClass'; import { performAdminLogin } from '../../utils/admin'; -import { redirectToHomePage, toastNotification } from '../../utils/common'; +import { + clickOutside, + redirectToHomePage, + toastNotification, +} from '../../utils/common'; import { sidebarClick } from '../../utils/sidebar'; const user = new UserClass(); @@ -80,7 +84,7 @@ test.describe('Profiler Configuration Page', () => { await adminPage.click('#metricConfiguration_0_metrics'); await adminPage.fill('#metricConfiguration_0_metrics', 'All'); await adminPage.getByRole('tree').getByText('All').click(); - await adminPage.getByTestId('heading').click(); + await clickOutside(adminPage); await adminPage.click('[data-testid="add-fields"]'); await adminPage.click('#metricConfiguration_1_dataType'); @@ -95,7 +99,7 @@ test.describe('Profiler Configuration Page', () => { await adminPage.fill('#metricConfiguration_1_metrics', 'column'); await adminPage.click(`[title="Column Count"]:has(:visible)`); await adminPage.click(`[title="Column Names"]:has(:visible)`); - await adminPage.getByTestId('heading').click(); + await clickOutside(adminPage); await adminPage.click('[data-testid="add-fields"]'); await adminPage.click('#metricConfiguration_2_dataType'); @@ -111,7 +115,7 @@ test.describe('Profiler Configuration Page', () => { await adminPage.click('#metricConfiguration_2_metrics'); await adminPage.fill('#metricConfiguration_2_metrics', 'All'); await adminPage.getByRole('tree').getByText('All').click(); - await adminPage.getByTestId('heading').click(); + await clickOutside(adminPage); await adminPage.click('#metricConfiguration_2_disabled'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts index 96b0fb05e56..6b31c905490 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts @@ -200,16 +200,21 @@ test('Search Index Application', async ({ page }) => { await expect(page.locator('[data-testid="cron-type"]')).not.toBeVisible(); const installApplicationResponse = page.waitForResponse('api/v1/apps'); + const getApplications = page.waitForRequest( + (request) => + request.url().includes('/api/v1/apps?limit') && + request.method() === 'GET' + ); await page.click('[data-testid="deploy-button"]'); await installApplicationResponse; await toastNotification(page, 'Application installed successfully'); - const card = page.locator( - '[data-testid="search-indexing-application-card"]' - ); + await getApplications; - expect(await card.isVisible()).toBe(true); + await expect( + page.getByTestId('search-indexing-application-card') + ).toBeVisible(); }); if (process.env.PLAYWRIGHT_IS_OSS) { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts index 6bce8978555..3a2c075f638 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts @@ -127,6 +127,8 @@ test.describe('Entity Version pages', () => { entities.forEach((entity) => { test(`${entity.getType()}`, async ({ page }) => { + test.slow(); + await entity.visitEntityPage(page); const versionDetailResponse = page.waitForResponse(`**/versions/0.2`); await page.locator('[data-testid="version-button"]').click(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ingestion/MySqlIngestionClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ingestion/MySqlIngestionClass.ts index bfd0c8ff087..55d728ca925 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ingestion/MySqlIngestionClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ingestion/MySqlIngestionClass.ts @@ -86,12 +86,10 @@ class MysqlIngestionClass extends ServiceBaseClass { await test.step('Add Profiler ingestion', async () => { const { apiContext } = await getApiContext(page); await redirectToHomePage(page); - - // Todo: Remove this patch once the issue is fixed #19140 - await resetTokenFromBotPage(page, { - name: 'profiler', - testId: 'bot-link-ProfilerBot', - }); + if (!process.env.PLAYWRIGHT_IS_OSS) { + // Todo: Remove this patch once the issue is fixed #19140 + await resetTokenFromBotPage(page, 'profiler-bot'); + } await visitServiceDetailsPage( page, diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts index 9c7a1f0242f..8d8cf212c44 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts @@ -119,11 +119,6 @@ export const FIELDS: EntityFields[] = [ name: 'tableType', localSearch: false, }, - { - id: 'Entity Type', - name: 'entityType', - localSearch: false, - }, { id: 'Chart', name: 'charts.displayName.keyword', diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts index 5c69a28e618..41f245998f4 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts @@ -22,7 +22,7 @@ import { customFormatDateTime, getEpochMillisForFutureDays } from './dateTime'; import { settingClick } from './sidebar'; import { revokeToken } from './user'; -const botName = `pw%bot-test-${uuid()}`; +const botName = `a-bot-pw%test-${uuid()}`; const BOT_DETAILS = { botName: botName, @@ -75,7 +75,7 @@ export const createBot = async (page: Page) => { // Verify bot is getting added in the bots listing page await expect( - page.getByRole('cell', { name: BOT_DETAILS.botName }) + page.getByTestId(`bot-link-${BOT_DETAILS.botName}`) ).toBeVisible(); await expect( @@ -222,21 +222,10 @@ export const redirectToBotPage = async (page: Page) => { await fetchResponse; }; -export const resetTokenFromBotPage = async ( - page: Page, - bot: { - name: string; - testId: string; - } -) => { - const settingClickResponse = page.waitForResponse('api/v1/bots?*'); - await settingClick(page, GlobalSettingOptions.BOTS); - await settingClickResponse; - - await page.getByTestId('searchbar').click(); - await page.getByTestId('searchbar').fill(bot.name); - - await page.getByTestId(bot.testId).click(); +export const resetTokenFromBotPage = async (page: Page, botName: string) => { + await page.goto(`/bots/${botName}`); + await page.waitForLoadState('networkidle'); + await page.waitForSelector('[data-testid="loader"]', { state: 'detached' }); await expect(page.getByTestId('revoke-button')).toBeVisible(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts index 3ee8ba4d91e..b320bb5bc8e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts @@ -503,6 +503,7 @@ export const visitLineageTab = async (page: Page) => { const lineageRes = page.waitForResponse('/api/v1/lineage/getLineage?*'); await page.click('[data-testid="lineage"]'); await lineageRes; + await page.waitForLoadState('networkidle'); }; export const fillLineageConfigForm = async (