vendredi 9 février 2018

Login through a web gateway with Cypress is timing out

I'm trying to perform some test for my webapp, but to do that I have to login to an external website, in order to do that my beforeEach statment is:

beforeEach(()=>{
    cy.visit('http://localhost:3001/')
    cy.get('#username')
        .type('user');
    cy.get('#password')
        .type('pass');
    cy.get('#fm1 > div > section.row.btn-row > input.btn.btn-submit.btn-block')
        .click();
})

The expected behaviour is that when i go to localhost:3001 it redirects me to another website where I set my login credentials and after clicking in login it redirects me to the original site.

The problem is that in the outsider website I'm receiving this

CypressError: Timed out after waiting '60000ms' for your remote page to load.

Your page did not fire its 'load' event within '60000ms'.

You can try increasing the 'pageLoadTimeout' value in 'cypress.json' to wait longer.

Browsers will not fire the 'load' event until all stylesheets and scripts are done downloading.

When this 'load' event occurs, Cypress will continue running commands.

Because this error occurred during a 'before each' hook we are skipping the remaining tests in the current suite: 'Test Drag and Drop, in cypr...'

I've tried to increase the pageLoadTimeout but it isn't working so, could you give me some guidance about this issue?

Aucun commentaire:

Enregistrer un commentaire