1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added cypress tests for mat stats javascript.

This commit is contained in:
2025-05-05 19:57:03 -04:00
parent 68a7b214c9
commit 2856060b11
13 changed files with 605 additions and 46 deletions

View File

@@ -2,14 +2,14 @@ Cypress.Commands.add('login', () => {
cy.visit('/');
cy.contains('Log In').click();
cy.url().should('include', '/users/sign_in');
cy.url().should('include', '/login');
// Fill in login form and submit
cy.get('[id=user_email]').type(Cypress.env('CYPRESS_USERNAME'));
cy.get('[id=user_password]').type(Cypress.env('CYPRESS_PASSWORD'));
cy.get('input[type=email]').type(Cypress.env('CYPRESS_USERNAME'));
cy.get('input[type=password]').type(Cypress.env('CYPRESS_PASSWORD'));
cy.get('input[type=submit]').click();
// Verify successful login
cy.contains('Signed in successfully');
cy.contains('Logged in successfully');
});