cypress-gherkin #1

Merged
Simon merged 9 commits from cypress-gherkin into master 2021-09-08 12:54:53 +02:00
Showing only changes of commit facf129f65 - Show all commits

View File

@ -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", () => {
@ -55,3 +28,30 @@ 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")
});
});
})