This project contains Cypress tests for the LabOS app, focusing on client web UI with backend verifications.
The project is written with TypeScript and structured with the page-object-model design, along with tools, actions, assertions & workflows.
- Install Node.js & npm Installation guide
- Run
npm i
- Run tests by running a
run-testsscript frompackage.json.
- Run the
open-cypressscript inpackage.json. - The Cypress app will open.
- Choose E2E Testing.
- Choose Browser.
- Choose tests file to run.
Important files:
cypress.config.ts- Cypress specific configuration & Node events setup.cypress.env.json- Environment variables. *Note: Currently holds login credentials which usually should not be exposed.cypress/support/e2e.ts- This file runs before every single spec file - good for global hooks.cypress/support/env.ts- Assign & export the environment variables.
Cypress folders:
actions- Generalized actions for reusability & maintainability.e2e- Holds spec test filesfixtures- Load a fixed set of static data located in a file to be used in tests.verifications- Generalized verifications for reusability & maintainability.lab-os- Code & data related to the application: Routes, Pages, Workflows, etc.
