From 0d770636e96033cbffd8c3bc011a642198c082c3 Mon Sep 17 00:00:00 2001 From: Rohit0301 Date: Wed, 5 Aug 2026 18:36:20 +0530 Subject: [PATCH] Clicking on api endpoint tab before asseting the entity card --- .../main/resources/ui/playwright/e2e/Pages/Entity.spec.ts | 3 ++- .../ui/playwright/support/entity/ApiEndpointClass.ts | 1 + .../resources/ui/playwright/support/entity/EntityClass.ts | 1 + .../src/main/resources/ui/playwright/utils/common.ts | 8 +++++++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Entity.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Entity.spec.ts index bd973ad6053a..5fd1f1df3b9c 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Entity.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Entity.spec.ts @@ -198,7 +198,8 @@ Object.entries(entities).forEach(([key, EntityClass]) => { page, EntityDataClass.domain1.responseData, entity.entityResponseData?.['fullyQualifiedName'] ?? - entity.entityResponseData?.['name'] + entity.entityResponseData?.['name'], + entity.exploreTabName ); await visitServiceDetailsPage( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiEndpointClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiEndpointClass.ts index a8bc245920ac..faf758b96102 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiEndpointClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/ApiEndpointClass.ts @@ -206,6 +206,7 @@ export class ApiEndpointClass extends EntityClass { this.serviceCategory = SERVICE_TYPE.ApiService; this.serviceType = ServiceTypes.API_SERVICES; this.type = 'ApiEndpoint'; + this.exploreTabName = 'API Endpoints'; this.childrenTabId = 'schema'; this.childrenSelectorId = this.children[0].fullyQualifiedName ?? ''; } diff --git a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts index 18814ef512c0..c9cfc6cc23b0 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts @@ -70,6 +70,7 @@ import { EntityTypeEndpoint } from './Entity.interface'; export class EntityClass { type = ''; + exploreTabName?: string; serviceCategory?: GlobalSettingOptions; serviceType?: ServiceTypes; childrenTabId?: string; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts index 95c55fb97d56..61822c386084 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts @@ -889,7 +889,8 @@ export const waitForSearchResult = async ( export const verifyDomainPropagation = async ( page: Page, domain: Domain['responseData'], - childFqnSearchTerm: string + childFqnSearchTerm: string, + exploreTabName?: string ) => { // Domain propagation from the parent service to its children — and the // subsequent search reindex — is eventually consistent. Gate on the search @@ -942,6 +943,11 @@ export const verifyDomainPropagation = async ( await searchBox.press('Enter'); await waitForAllLoadersToDisappear(page); + if (exploreTabName) { + await page.getByRole('menuitem', { name: exploreTabName }).click(); + await waitForAllLoadersToDisappear(page); + } + const entityCard = page.getByTestId(`table-data-card_${childFqnSearchTerm}`); await expect(entityCard).toBeVisible({ timeout: 30_000 }); await expect(entityCard).toContainText(domain.displayName);