Indicate when XHR's match aliases multiple times, and correlate those to waits
See original GitHub issueCurrent behavior:
There’s not an easy to know or correlate multiple matched XHR aliases to knowing how to wait for them.
Here’s an example screenshot:
The problem is that the user is trying to wait on the 2nd XHR. But since they’ve only added a single cy.wait("@getTable")
Cypress only waited on the first XHR to resolve.
Desired behavior:
When an XHR matches an alias multiple times we should add a number indicator next to it…
(XHR) /getTable @getTable
(XHR) /getTable @getTable.2
(XHR) /getTable @getTable.3
So then when adding code like:
cy
.wait("@getTable")
.wait("@getTable")
.wait("@getTable")
The command log would actually look like:
WAIT @getTable
WAIT @getTable.2
WAIT @getTable.3
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Wait for multiple XHR requests to the same url or endpoint
You should set up an alias (using .as()) to a single cy.route() that matches all of the XHRs. You can then cy.wait() on...
Read more >Azure Application Insights for JavaScript web apps
Get page view and session counts, web client data, and single-page applications and track usage patterns. Detect exceptions and performance ...
Read more >AM 6 > Authentication and Single Sign-On Guide
For example, the following callback indicates a wait time of 10 seconds: ... For more information, see "To Configure DNS Aliases for Accessing...
Read more >The CometD Reference Book — 7.0.9
The address https://bugs.cometd.org is an alias for the CometD GitHub ... You can use wildcards to match multiple channels: channel /foo/* ...
Read more >A measurement study of insecure javascript practices on the ...
more popular than using the relatively secure technique of creating script elements via DOM methods. Our analysis indicates that safe alternatives to these...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bsmithEG There actually is an undocumented way to check the number of times an XHR was responsed to using
.all
on the alias.This is just what I need, but I can’t find anything in the docs. How would I wait for the nth instance of a particular call?