I am using Blazor WebAssembly SPA app. WaitForResponse is failing with TimeoutError, even when before the timeour API has completed successfully. On click of button, my app makes an API call.
What am i doing wrong here ?
await Promise.all([
page.waitForResponse(resp => resp.url() === 'https://XXXXXX.net/api/Organization/GetTokenFromMobile' && resp.status() === 200),
page.locator('button.btn-success', { hasText: 'GetToken' }).click()
]);