From facf129f65f08888d441608adad465aa2fc1ea6c Mon Sep 17 00:00:00 2001 From: Simon Priet Date: Wed, 8 Sep 2021 10:04:37 +0200 Subject: [PATCH] refactor(Cypress): Reordered test cases in the feature code file. --- cypress/integration/inbox/inbox.js | 58 +++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/cypress/integration/inbox/inbox.js b/cypress/integration/inbox/inbox.js index 38329078..d22e2946 100644 --- a/cypress/integration/inbox/inbox.js +++ b/cypress/integration/inbox/inbox.js @@ -1,32 +1,5 @@ /* global Given, When, Then */ -import { Given, When, Then, And } from "cypress-cucumber-preprocessor/steps"; - -describe("Connect to the mailbox", () => { - - Given("I log with my credentials", () => { - cy.visit('/'); - cy.get('#email').type("candidature-qa@example.org"); - cy.get('#password').type("kHwWawhH5ADNuFb"); - cy.get('#continueButton').click(); - }); - - And("I receive a code by SMS", () => { - cy.get("#challenge_mfa_form_candidate_otp").should("be.visible"); - }); - - When("I put the code", () => { - cy.wait(20000).then(() => { - cy.get('#validateButton').click(); - }); - }); - - Then("I am connected", () => { - cy.get("#account-menu div[title]").should((elm) => { - expect(elm).to.contain("candidature-qa@example.org") - }); - }); - -}) +import { Given, When, Then, And, Before } from "cypress-cucumber-preprocessor/steps"; describe("Send a document", () => { @@ -54,4 +27,31 @@ describe("Send a document", () => { //? }); -}); \ No newline at end of file +}); + +describe("Connect to the mailbox", () => { + + Given("I log with my credentials", () => { + cy.visit('/'); + cy.get('#email').type("candidature-qa@example.org"); + cy.get('#password').type("kHwWawhH5ADNuFb"); + cy.get('#continueButton').click(); + }); + + And("I receive a code by SMS", () => { + cy.get("#challenge_mfa_form_candidate_otp").should("be.visible"); + }); + + When("I put the code", () => { + cy.wait(20000).then(() => { + cy.get('#validateButton').click(); + }); + }); + + Then("I am connected", () => { + cy.get("#account-menu div[title]").should((elm) => { + expect(elm).to.contain("candidature-qa@example.org") + }); + }); + +})