From 44a39ed475b419eee87c33d8aebc4e278af49fe3 Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Wed, 3 Sep 2025 13:30:37 +0530 Subject: [PATCH] Chore(UI): Fix advanced search playwright flakiness (#23176) * Fix the flakiness in advanced search spec * Add applications docs * Fix the selection confirmation not working in case of custom property * Fix the DataContract spec failure * Fix the errors --- .../resources/ui/playwright/utils/advancedSearch.ts | 12 +++++++++--- .../ui/playwright/utils/customizeLandingPage.ts | 5 ++--- .../locales/en-US/Applications/McpApplication.md | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) 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 a0401c2234a..34bb111d1b9 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/advancedSearch.ts @@ -323,7 +323,10 @@ export const checkMustPaths = async ( }); const searchRes = page.waitForResponse( - '/api/v1/search/query?*index=dataAsset&from=0&size=15*' + `/api/v1/search/query?*index=dataAsset&from=0&size=15*${getEncodedFqn( + searchData, + true + )}*` ); await page.getByTestId('apply-btn').click(); @@ -366,7 +369,10 @@ export const checkMustNotPaths = async ( }); const searchRes = page.waitForResponse( - '/api/v1/search/query?*index=dataAsset&from=0&size=15*' + `/api/v1/search/query?*index=dataAsset&from=0&size=15*${getEncodedFqn( + searchData, + true + )}*` ); await page.getByTestId('apply-btn').click(); const res = await searchRes; @@ -406,7 +412,7 @@ export const checkNullPaths = async ( }); const searchRes = page.waitForResponse( - '/api/v1/search/query?*index=dataAsset&from=0&size=15*' + '/api/v1/search/query?*index=dataAsset&from=0&size=15*"exists"*' ); await page.getByTestId('apply-btn').click(); const res = await searchRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeLandingPage.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeLandingPage.ts index 4baf0296636..33acb9fa645 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeLandingPage.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/customizeLandingPage.ts @@ -17,6 +17,7 @@ import { toastNotification, visitOwnProfilePage, } from './common'; +import { waitForAllLoadersToDisappear } from './entity'; import { settingClick } from './sidebar'; export const navigateToCustomizeLandingPage = async ( @@ -183,9 +184,7 @@ export const addCuratedAssetPlaceholder = async ({ }); await openAddCustomizeWidgetModal(page); - await page.locator('[data-testid="loader"]').waitFor({ - state: 'detached', - }); + await waitForAllLoadersToDisappear(page); await page.locator('[data-testid="KnowledgePanel.CuratedAssets"]').click(); diff --git a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Applications/McpApplication.md b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Applications/McpApplication.md index c8bc6cf456e..7d884bc1d08 100644 --- a/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Applications/McpApplication.md +++ b/openmetadata-ui/src/main/resources/ui/public/locales/en-US/Applications/McpApplication.md @@ -4,7 +4,7 @@ MCP Server app installs an embedded Model Context Protocol(MCP) server within Op 1. SSE : http[s]://openmetadata-host/mcp/sse - - This endpoint can be used by client if SSE transport is used. + - This endpoint can be used by client if Streamable-Http transport is used. 2. Streamable-Http : http[s]://openmetadata-host/mcp @@ -23,4 +23,4 @@ $$section The allowed origin URI that clients must include in their Origin header when validation is enabled. Only requests from this URI will be accepted. Example: `https://myapp.example.com` -$$ +$$ \ No newline at end of file