57 lines
1.8 KiB
JavaScript

/// <reference types="cypress" />
context('The login page', () => {
describe.skip('Test the login page', () => {
it('Access the webpage', function() {
cy.visit('/login');
cy.get('#email').should("have.attr", "type", "email");
cy.get('#password').should("have.attr", "type", "password");
//cy.get('#password').type(mdp);
});
it('Log an invalid email', function() {
cy.visit('/login');
cy.get('#email').type("not an email");
cy.get('#password').type("somepasseword {enter}");
cy.url().should('include', 'login?');
});
it('Log an unexisting user', function() {
cy.visit('/login');
cy.get('#email').type("toto@yopmail.com");
cy.get('#password').type("somepasseword {enter}");
cy.get('#error-message').should("have.class", "alert alert-danger").should("be.visible");
});
});
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, {
sentTo: smsNumber
}).as('sms');
cy.get('#challenge_mfa_form_candidate_otp').type('@sms');
cy.get('#validateButton').click();
});
});
});
context("The inbox page", function() {
describe("", function() {
it("It load the inbox page of a valid user");
it("It checks for messages in the inbox");
it("Open the message for data that has been injected previously");
});
});