Welcome to the QA Workshop. This project is your starting point for writing automated end-to-end tests with Cypress.
You will be writing tests for the Login, Sign Up, and Password Reset flows of the TalentLMS Plus portal. The requirements are documented in the PRD – read it before you touch any code.
- Node.js v18 or higher
- A TalentLMS dev portal (you should already have one)
- A test user account on your portal
1. Install dependencies
npm install2. Configure your portal URL
Open cypress.config.js and replace the baseUrl value with your own portal:
baseUrl: 'https://your-subdomain.dev.talentlms.com'3. Set up your credentials
Copy the example file and fill in your own values:
cp cypress.env.json.example cypress.env.jsonThen open cypress.env.json and add your test account credentials:
{
"username": "your_test_username",
"password": "your_test_password"
}
cypress.env.jsonis listed in.gitignore— credentials are never committed to the repository.
Open the interactive Cypress runner (recommended while writing tests):
npm run cy:openRun all tests headlessly (useful for CI):
npm run cy:runRun a single spec:
npm run cy:run:login
npm run cy:run:signup
npm run cy:run:password-resetcypress/
├── e2e/ # Test files – one per feature flow
│ ├── login.cy.js # Happy path scaffold – implement and expand from the PRD
│ ├── signup.cy.js # Happy path scaffold – includes fixture usage hint
│ └── password-reset.cy.js # Happy path scaffold – write everything from the PRD
│
├── fixtures/
│ └── users.json # Test data for signup scenarios (newUser, invalidUser)
│
├── page-objects/
│ ├── LoginPage.js # Selectors + actions for /plus/login
│ ├── SignupPage.js # Selectors + actions for /plus/signup
│ └── PasswordResetPage.js # Selectors + actions for /plus/password-reset
│
└── support/
├── e2e.js # Loaded before every test – imports commands
└── commands.js # Custom cy.login() and cy.logout() commands
The PRD defines exactly what the application should do. Every it() block in the test files maps to a scenario in the PRD. Read it first.
Login, Signup & Password Reset – PRD for QA Workshop
Open your portal in the browser. Use DevTools to inspect the elements and find their data-testid attributes. These are your selectors.
Before writing tests, implement the Page Objects in cypress/page-objects/. Each file has comments guiding you on what to add.
Open cypress/support/commands.js and implement cy.login() and cy.logout(). These are used across multiple test files.
Each test file has a happy path scaffold to show you the structure. Implement it, then add the remaining scenarios from the PRD.
For signup.cy.js, check the fixture hint at the top of the file — signup tests use data from cypress/fixtures/users.json.
| Concept | Description |
|---|---|
| Page Object Model | Separates selectors and actions from test logic. One class per page. |
| Selectors | HTML attributes used for testing. Try to find stable ones across style changes. |
| Fixtures | JSON files in cypress/fixtures/ that store reusable test data. Used in signup tests via cy.fixture('users'). |
| Custom Commands | Reusable Cypress commands defined in commands.js (e.g. cy.login()). |
| cy.env() | Reads values from cypress.env.json – used for credentials and secrets. |
- Why do we use
data-testidinstead of CSS classes? - Why do we put credentials in
cypress.env.jsonand not directly in the test file? - The happy-path signup test will fail the second time you run it. Why? How would you fix this in a real project?
- On the password reset page: should the app tell you if the account doesn't exist?