Current behavior:
Yep, there is an issue if you don't wait for all XHRs to finish after a test. When it tries to cancel the XHR it fails with the error: -
UnsubscriptionError: 1 errors occurred during unsubscription:
1) TypeError: Cannot set property 'aborted' of undefined
if I do an explicit cy.wait(2000) or cy.wait('@myxhr') it works
note it's the following test that fails, not the one with the XHR
Desired behavior:
The XHR should be cancelled correctly before the next test starts
How to reproduce:
Have a longish running XHR fire at the end of one test and have a subsequent test.
Additional Info (images, stack traces, etc)
It seems to happen when I am faking a route failure (status 500) and then make another (non-faked) XHR (to report the error to a server). e.g.: -
cy.route({
method: 'PUT',
url: '/Endpoint/Id',
status: 500,
response: ''
}).as('saveStuff');
- Operating System: Ubuntu 16.04
- Cypress Version: 1.0.2
- Browser Version: Electron 53
Current behavior:
Yep, there is an issue if you don't wait for all XHRs to finish after a test. When it tries to cancel the XHR it fails with the error: -
if I do an explicit
cy.wait(2000)orcy.wait('@myxhr')it worksnote it's the following test that fails, not the one with the XHR
Desired behavior:
The XHR should be cancelled correctly before the next test starts
How to reproduce:
Have a longish running XHR fire at the end of one test and have a subsequent test.
Additional Info (images, stack traces, etc)
It seems to happen when I am faking a route failure (status 500) and then make another (non-faked) XHR (to report the error to a server). e.g.: -