refactor(Cypress): Reordered test cases in the feature code file.
This commit is contained in:
parent
311c69f770
commit
facf129f65
@ -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", () => {
|
||||
//?
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
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")
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user