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'
);
});
Attaching Picture:
Thanks for helping!