Skip to content

Failed xhr calls can be matched up with later calls #19039

@mjhenkes

Description

@mjhenkes

Current behavior

This issue was discovered by investigating flake in the redirect driver tests. An xhr call would randomly show up in the log where none should be.

Note the blue 'xhr' request in the third test case.
Screen Shot 2021-11-22 at 10 34 01 AM
*screenshot from the reproduced test case but you can see the problem regardless.

Desired behavior

Improve xhr matching and clean up failed xhr calls that have failed each retry.

Test code to reproduce

Using branch mimatched-xhr-calls
I've created a test case called 'retry_spec` in the driver to showcase the problem

The test fails an xhr call 25 times to queue up the failed pre-request then uses a meta redirect to make the same call which will match to a failed xhr call.

Cypress Version

9.0.0 and earlier

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleno activity on this issue for a long period

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions