refactor(Cypress): Init a version of the test exam with pure cypress (no Gherkin)
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
Feature: Send a document that is ready
|
||||
|
||||
As a practiciant, I can send mails that i have prepared
|
||||
Scenario: Send a document
|
||||
Given I am connected to my mailbox
|
||||
And I have a document ready to send
|
||||
When I send the mail
|
||||
Then The mail is sent
|
||||
|
||||
Scenario: Connect to the mailbox
|
||||
Given I log with my credentials
|
||||
And I receive a code by SMS
|
||||
When I put the code
|
||||
Then I am connected
|
@@ -26,25 +26,27 @@ context('The login page', () => {
|
||||
|
||||
});
|
||||
|
||||
/* describe("It send an SMS", function() {
|
||||
describe("It send an SMS", function() {
|
||||
it('Log the candidate user', function(){
|
||||
cy.visit('/');
|
||||
cy.get('#email').type("candidature-qa@example.org");
|
||||
cy.get('#password').type("kHwWawhH5ADNuFb");
|
||||
cy.get('#continueButton').click();
|
||||
|
||||
cy.mailosaurGetMessage(serverId, {
|
||||
/*cy.mailosaurGetMessage(serverId, {
|
||||
sentTo: smsNumber
|
||||
}).as('sms');
|
||||
}).as('sms'); */
|
||||
|
||||
cy.wait(10000).then(() => {
|
||||
cy.get('#validateButton').click();
|
||||
});
|
||||
|
||||
cy.visit("/request")
|
||||
// should be on the inbox
|
||||
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
|
||||
context("The inbox page", function() {
|
||||
|
@@ -1,57 +0,0 @@
|
||||
/* global Given, When, Then */
|
||||
import { Given, When, Then, And, Before } from "cypress-cucumber-preprocessor/steps";
|
||||
|
||||
describe("Send a document", () => {
|
||||
|
||||
Given("I am connected to my mailbox", () => {
|
||||
cy.visit('/');
|
||||
cy.get('#email').type("candidature-qa@example.org");
|
||||
cy.get('#password').type("kHwWawhH5ADNuFb");
|
||||
cy.get('#continueButton').click();
|
||||
cy.wait(20000).then(() => {
|
||||
cy.get('#validateButton').click();
|
||||
});
|
||||
cy.visit("/request");
|
||||
|
||||
})
|
||||
|
||||
And("I have a document ready to send", () => {
|
||||
cy.get("#dashboard-dropzone tr:first-child td").eq(1).click();
|
||||
});
|
||||
|
||||
When("I send the mail", () => {
|
||||
cy.get("#sending-button").click();
|
||||
});
|
||||
|
||||
Then("The mail is sent", () => {
|
||||
//?
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
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")
|
||||
});
|
||||
});
|
||||
|
||||
})
|
Reference in New Issue
Block a user