Skip to content
RED SAG Skills
hardStudy question · answer published in JavaScript interview questions, so no pointsplaywrightflaky-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