Skip to content

Commit

Permalink
Added registration form automation test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianaQAaug2024 committed Oct 13, 2024
1 parent 5020b1a commit 4994aed
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions cypress/e2e/registration.cy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
/// <reference types='cypress' />
/// <reference types="cypress" />

describe('Student Registration page', () => {
before(() => {

cy.visit('https://demoqa.com/automation-practice-form');
});

it('', () => {
it('fills in the registration form and submits it', () => {
cy.get('#firstName').type('John');
cy.get('#lastName').type('Doe');

cy.get('#userEmail').type('[email protected]');

cy.get('#genterWrapper').find('label').contains('Male').click();

cy.get('#userNumber').type('1234567890');

cy.get('#dateOfBirthInput').click();
cy.get('.react-datepicker__month-select').select('May');
cy.get('.react-datepicker__year-select').select('1990');
cy.get('.react-datepicker__day--015').click();

cy.get('#subjectsInput').type('Maths{enter}');

cy.get('#hobbiesWrapper').find('label').contains('Sports').click();

cy.get('#currentAddress').type('123 Main St, Cityville');

cy.get('#submit').click();

cy.get('.modal-content').should('be.visible');
cy.get('.table-responsive').should('contain', 'John Doe');
cy.get('.table-responsive').should('contain', '[email protected]');
cy.get('.table-responsive').should('contain', 'Male');
cy.get('.table-responsive').should('contain', '1234567890');
});
});

0 comments on commit 4994aed

Please sign in to comment.