UI test automation project for https://www.tangerine.ca/ using TypeScript. The primary runner is Cypress with Page Object Model classes and Allure reporting. The repository also includes Playwright specs and a separate SQLite query utility package.
- Cypress end-to-end tests for homepage, login, and registration flows.
- POM classes in
cypress/support/pagesused by Cypress tests. - Allure integration for local reports and CI artifacts.
- Playwright specs in
playwright/tests. - A standalone
queriespackage for SQLite-related utilities.
- Node.js 18+
- npm 9+
- TypeScript 5
- Cypress 15
- Playwright Test 1.61
- Allure via
@shelex/cypress-allure-pluginandallure-commandline
sloth-javascript/
|-- cypress/
| |-- tests/
| |-- support/
| | |-- config.ts
| | `-- pages/
| |-- downloads/
| |-- screenshots/
| |-- allure-results/ # generated test result files
| `-- allure-report/ # generated report output
|-- playwright/
| |-- concepts/
| `-- tests/
|-- queries/ # separate package with its own package.json
|-- cypress.config.ts
|-- playwright.config.ts
|-- tsconfig.json
|-- package.json
`-- Readme.md
Install these tools before running tests:
- Node.js 20 LTS (or newer; minimum supported is Node.js 18)
- npm 9+
- Git
- Java Runtime (required to generate/open Allure HTML reports)
Quick checks:
node -v
npm -v
java -versiongit clone https://github.com/466725/sloth-javascript.git
cd sloth-javascript
npm installnpx playwright installIf your machine is Linux and Playwright reports missing OS libraries:
npx playwright install --with-depsOnly needed if you plan to run anything in queries/.
npm --prefix queries installnpx cypress run --spec "cypress/tests/login.cy.ts"
npx playwright test playwright/tests/login.spec.tsIf both commands pass, your machine is ready.
Tests use BASE_URL when provided; otherwise they default to:
https://www.tangerine.ca/en/personal
PowerShell:
$env:BASE_URL="https://www.tangerine.ca/en/personal"
npm testbash:
BASE_URL="https://www.tangerine.ca/en/personal" npm testSample credentials are defined in cypress/support/config.ts as:
testCredentials.usertestCredentials.invalidUser
Do not use real secrets in source code for production-like environments.
You can override the default base URL for both Cypress and Playwright with BASE_URL.
PowerShell:
$env:BASE_URL="https://www.tangerine.ca/en/personal"bash:
export BASE_URL="https://www.tangerine.ca/en/personal"npm run cypress:open- open Cypress app.npm run cypress:run- run all Cypress specs headlessly.npm test- alias fornpm run cypress:run.npm run allure:generate- build Allure report fromcypress/allure-results.npm run allure:open- open generated report.
# Run all Cypress tests
npm test
# Open Cypress UI
npm run cypress:open
# Run a single spec
npx cypress run --spec "cypress/tests/login.cy.ts"Generate and open Cypress Allure report:
npm run allure:generate
npm run allure:openPlaywright is installed in root dev dependencies with dedicated npm scripts.
npm run playwright:test- run all Playwright specs.npm run playwright:debug- run all Playwright specs in debug mode (Inspector).npm run playwright:allure:generate- build Allure report fromplaywright/allure-results.npm run playwright:allure:open- open generated Playwright Allure report.
If Playwright browsers are not installed yet:
npx playwright installRun all Playwright specs in this project:
npx playwright test playwright/tests/*.spec.tsRun one Playwright spec:
npx playwright test playwright/tests/login.spec.tsDebug one TypeScript Playwright spec in Inspector (slow-motion step-through):
$env:PWDEBUG="1"; npx playwright test playwright/tests/login.spec.tsDebug all TypeScript Playwright specs:
$env:PWDEBUG="1"; npx playwright test playwright/tests/*.spec.tsGenerate and open Playwright Allure report:
npm run playwright:allure:generate
npm run playwright:allure:opencypress/tests/homepage.cy.ts- homepage/logo visibility
- app download links visibility
- hover behavior for Save menu
- analytics request capture check
cypress/tests/login.cy.ts- login flow entry and login input interaction
cypress/tests/register.cy.ts- visible Sign Up or Become a Client link check
Equivalent checks exist in:
playwright/tests/homepage.spec.tsplaywright/tests/login.spec.tsplaywright/tests/register.spec.ts
After running Cypress tests:
npm run allure:generate
npm run allure:openPaths used by this project:
- Results:
cypress/allure-results - Report:
cypress/allure-report
After running Playwright tests:
npm run playwright:allure:generate
npm run playwright:allure:openPlaywright paths used by this project:
- Results:
playwright/allure-results - Report:
playwright/allure-report - Screenshots/artifacts:
playwright/screenshots
allure: command not found:- Run
npm installat project root. - Confirm Java is installed (
java -version).
- Run
- Playwright fails before tests start:
- Run
npx playwright install. - On Linux, run
npx playwright install --with-deps.
- Run
- Cypress opens but test fails on first page load:
- Confirm internet access to
https://www.tangerine.ca. - Retry with explicit
BASE_URLset for your environment.
- Confirm internet access to
GitHub Actions workflow: .github/workflows/ci.yml
Current pipeline behavior:
- Triggers on push, pull request, schedule, and manual dispatch.
- Runs on Ubuntu with Node.js 20.
- Executes Cypress tests on Chrome.
- Generates Allure report.
- Uploads Allure results and report artifacts.
- Uploads Cypress screenshots when failures occur.
The queries folder is a standalone package with its own dependencies and scripts.
Install dependencies for that package:
npm --prefix queries installRun its SDK entry:
npm --prefix queries run sdkRun its setup script:
npm --prefix queries run setup- Contribution guide:
CONTRIBUTING.md - Code of conduct:
CODE_OF_CONDUCT.md - Security policy:
SECURITY.md - Changelog:
CHANGELOG.md
MIT. See LICENSE.