Cypress XHR requests get aborted when running headless, in cypress based image container
See original GitHub issueCurrent behavior
Cypress XHR requests get aborted when running headless, in a cypress-based image container. Browser: Electron
describe('Test Sign-In and search', () => {
before(() => {
cy.clearLocalStorageSnapshot();
});
beforeEach(() => {
cy.restoreLocalStorage();
});
afterEach(() => {
cy.saveLocalStorage();
});
it('Test Sign In Process', () => {
cy.visit(Cypress.config().baseUrl);
cy.get('[data-test="signInHeader"]', { timeout: 10000 }).should(
'be.visible'
);
cy.get('[data-test="emailInput"]').type(Cypress.env('USER_EMAIL'));
cy.get('[data-test="passwordInput"]').type(Cypress.env('USER_PASSWORD'));
cy.get('[data-test="signInBtn"]').click(); // Preform Sign-in
cy.get('[data-test="newAnalysisHeader"]', { timeout: 25000 }).should(
'be.visible'
);
});
Desired behavior
To not abort the XHR request 😦
Test code to reproduce
Use angular, with angular client add some HTTP requests (angular client based XHR requests).
Cypress Version
9.1.1
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
XHR requests get aborted when running headless, in cypress ...
Current behavior Cypress XHR requests get aborted when running headless, in a cypress-based image container. After Signing in some XHR requests ...
Read more >Cypress XHR requests get aborted when running headless, in ...
I had an issue with WAF (AWS Cloud). in my cloud front, there was a rule to block XHR requests to the backend....
Read more >cypress-io/cypress - Gitter
But 1) running xhr requests will be aborted by the browser when it unload the page (so you visit a new url). 2)...
Read more >Changelog - Cypress Documentation
Fixed an issue where snapshots performed in XHR requests could reflect the primary domain ... See Running headless tests without Xvfb for more...
Read more >Some UI testing problems and the Cypress way - ITNEXT
Testing a front-end application brings some challenges that the “classic” tests have not: you need to orchestrate a real browser.
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
related https://github.com/cypress-io/cypress/discussions/22254
It would still be helpful if you could put together a reproducible example; perhaps a public github repo demonstrating your problem.
One easy way to do that is with a fork of https://github.com/cypress-io/cypress-test-tiny, and then include the docker command you’re using either in a script or in a comment here.