Welcome to the POM-Based-Cypress-HRMS-Applications, a robust end-to-end (E2E) testing solution built with Cypress and following the Page Object Model (POM) design pattern.
This framework automates the login and dashboard functionalities of the SmartOffice application.
This project leverages Cypress for E2E testing and POM to ensure maintainable and scalable test scripts.
It tests the SmartOffice application's login process and dashboard features (payslip, noticeboard views) on the staging environment:
- ✅ BDD-based testing with Gherkin syntax in feature files
- ✅ POM implementation for reusable and maintainable page objects
- ✅ Automated login with valid user and supervisor credentials
- ✅ Dashboard validation: payslip and noticeboard views
- ✅ Environment variable support for secure credential management
- ✅ Cypress screenshots & videos for detailed reporting
- Node.js: v16.x or higher
- npm: v6.x or higher
- Cypress: v15.0.0 or compatible
- A code editor (e.g., VS Code) with Cypress and Cucumber plugins
- Internet connection to access the staging environment
git clone https://github.com/mookto/POM-based-cypress.git cd HRMS-cypress-bdd
npm install
npx cypress open or npx cypress run --spec cypress/e2e/features/HRMS.feature
cypress/
└── e2e/
├── tests/
└── hrms.spec.js
└── pages/
├── login.js
└── dashboard.js
└── support/
└── commands.js
cypress.config.js
package.json-
features/HRMS.feature – Gherkin scenarios
-
step_definitions/HRMS.steps.js – Implements step definitions
-
pages/login.js & dashboard.js – POM-based page objects
-
support/commands.js – Custom commands and Cucumber plugin configs
-
cypress.config.js – Cypress & Cucumber preprocessor configuration
- Fork the repository
- Create a new branch: