lundi 18 février 2019

Cypress.io - save value in JavaScript Prompt

I am new in Cypress and I have a problem.

I the app, I have a "Save Button". When you click the button, it is triggered JS prompt. Inside the prompt you write the name of the save (like "Save from John") and click to "OK" - inside the prompt.

I need to cover this user story by the E2E test in Cypress.io.

Problem is, when I click the "Save button", cypress freeze in Click() event, when the prompt is displayed.

it('Make a new save with JS prompt', () => {
   cy.get('#save-changes-button')
   .should('be.visible')
   .click() //here the prompt is displayed, cypress stop and wait for click() event finish
})

May I ask for some help? I did not found siutable solution in Cypress.io Docs or elsewhere.

Aucun commentaire:

Enregistrer un commentaire