From 995fcf09ad608676cf58eca777c7feb971e8e7f0 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 26 May 2020 07:37:29 +0200 Subject: [PATCH] Force checkbox --- client/cypress/support/commands.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/cypress/support/commands.js b/client/cypress/support/commands.js index 6c4c3b0d..0a0e8932 100644 --- a/client/cypress/support/commands.js +++ b/client/cypress/support/commands.js @@ -151,7 +151,9 @@ Cypress.Commands.add('register', (prefix, firstname, lastname, street, city, pos } if (acceptTerms) { - cy.get('[data-cy="acceptedTerms-input"] > span').first().click(); + cy.get('[data-cy="acceptedTerms-input"] > input').first().check({force: true}).then(() => { + cy.get('[data-cy="acceptedTerms-input"] > input:checkbox').should('be.checked'); + });; } cy.get('[data-cy="passwordConfirmation-input"]').type(passwordConfirmation);