From 0c39d63b6e4f26896d14f8382ef536ac4bbcd95f Mon Sep 17 00:00:00 2001 From: Splines Date: Sun, 1 Dec 2024 23:47:01 +0100 Subject: [PATCH] Check for visible state Usually `click()` should already do this for us I thought. --- spec/cypress/e2e/vouchers_redemptions_spec_helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/cypress/e2e/vouchers_redemptions_spec_helpers.js b/spec/cypress/e2e/vouchers_redemptions_spec_helpers.js index 09f51dec4..c53967f10 100644 --- a/spec/cypress/e2e/vouchers_redemptions_spec_helpers.js +++ b/spec/cypress/e2e/vouchers_redemptions_spec_helpers.js @@ -117,7 +117,7 @@ export function logoutAndLoginAsTeacher(context) { export function verifyNoTutorialsButUserEligibleAsTutor(context, shouldBeEligible = true) { cy.getBySelector("tutorial-row").should("not.exist"); - cy.getBySelector("new-tutorial-btn").click(); + cy.getBySelector("new-tutorial-btn").should("be.visible").click(); cy.then(() => { cy.getBySelector("tutorial-form").should("be.visible"); cy.getBySelector("tutor-select").within(() => {