Skip to content
RED SAGSkills
hard20 pts · first answer countsplaywrightflaky-testsasync-javascript

Missing the response you wait for

This test sometimes times out even though the request succeeds. Why, and what is the fix?

await page.getByRole('button', { name: 'Search' }).click()
const res = await page.waitForResponse('**/api/search*')
expect(res.ok()).toBeTruthy()
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions