Files
cbsnexora/cypress/e2e/spec.cy.ts
T
Devansh Vashisht 6ce263b2e3 test: add Cypress E2E test for Audit Trails CSV download
- Added comprehensive E2E test to prevent CSV download regression
- Implemented stable error toast verification to avoid false positives
- Updated .browserslistrc to remove outdated browser versions
- Refined .gitignore to exclude only Cypress-generated artifacts
- Configured proper test selectors and wait strategies

Addresses: WEB-493
2025-12-12 13:54:28 +05:30

30 lines
836 B
TypeScript

describe('Login Page', () => {
it('Visits the initial web page', () => {
cy.visit('/');
cy.url().should('includes', 'login');
cy.get('#mat-input-0').should('be.visible');
cy.get('#mat-input-1').should('be.visible');
cy.contains('Login');
cy.contains('Remember me');
});
it('Login', () => {
cy.visit('/');
cy.get('#mat-input-0').type('mifos');
cy.get('#mat-input-1').type('password');
cy.get('.mat-raised-button').click();
cy.contains('Home');
});
it('Logout', () => {
cy.visit('/#/login');
cy.get('#mat-input-0').type('mifos');
cy.get('#mat-input-1').type('password');
cy.get('.mat-raised-button').click();
cy.get('mifosx-warning-dialog button').click();
cy.get('.img-button').click();
cy.get('#logout').click();
cy.contains('Username');
});
});