Skip to content

Commit 25d7b14

Browse files
shrabantipaul-collateShrabanti Paul
authored andcommitted
Fix flaky test for tour specs (#25965)
* fix flaky test for tour specs * address review comment --------- Co-authored-by: Shrabanti Paul <shrabantipaul@Shrabantis-MacBook-Pro.local>
1 parent 89a74f2 commit 25d7b14

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow

openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ const validateTourSteps = async (page: Page) => {
6363
await expect(page.locator(`[data-tour-elem="badge"]`)).toHaveText('3');
6464

6565
await page.getByTestId('searchBox').fill('dim_a');
66-
await page.getByTestId('searchBox').press('Enter', { delay: 500 });
66+
67+
const [searchResponse] = await Promise.all([
68+
page.waitForResponse((res) => res.url().includes('/search/query')),
69+
page.getByTestId('searchBox').press('Enter'),
70+
]);
71+
72+
expect(searchResponse.status()).toBe(200);
6773

6874
await expect(page.locator(`[data-tour-elem="badge"]`)).toHaveText('4', {
6975
timeout: 1000,

0 commit comments

Comments
 (0)