Fix the flakiness in service ingestion playwright (#23334)

(cherry picked from commit d9f34bb1fafcbaee5d38846a54514679bdbf689c)
This commit is contained in:
Aniket Katkar 2025-09-11 09:51:13 +05:30 committed by OpenMetadata Release Bot
parent 997c187c5d
commit 75e7b832d5

View File

@ -11,13 +11,18 @@
* limitations under the License.
*/
import { expect, Page } from '@playwright/test';
import { escapeESReservedCharacters, getEncodedFqn } from './entity';
import { settingClick, SettingOptionsType } from './sidebar';
export const searchServiceFromSettingPage = async (
page: Page,
service: string
) => {
const serviceResponse = page.waitForResponse(`/api/v1/search/query?q=*`);
const serviceResponse = page.waitForResponse(
`/api/v1/search/query?q=**${getEncodedFqn(
escapeESReservedCharacters(service)
)}**`
);
await page.fill('[data-testid="searchbar"]', service);
await serviceResponse;