← All projects

Featured project 8 · TypeScript · E2E + API + Component

Cypress + TypeScript Framework

End-to-end, API and component tests with Cypress 16 and TypeScript for a React + Node task app kept in the repository: 81 Cypress tests, green in GitHub Actions on Chrome, Firefox and Edge.

Live CI status of Cypress + TypeScript Framework

View source code View documentation View latest CI runs View test report

Purpose

Shows what Cypress does best: tests that control the browser's network, clock and login, and component tests next to end-to-end tests. The app under test, TaskBoard, is part of the repository, so no public demo site can break a run, every test can reset the data, and the React components can be mounted on their own.

Technology stack

AreaTools
Test frameworkCypress 16.2 (e2e and component testing)
LanguageTypeScript 6.0
Contractszod 4 strict schemas
App under testReact 19 + Vite 8 web app, Node.js 24 API with no dependencies (and its own node:test tests)
Reportcypress-mochawesome-reporter: one HTML file per run with failure screenshots
Code quality and CIESLint (type-aware + Cypress rules), Prettier, GitHub Actions with cypress-io/github-action

Architecture overview

cypress/e2e/api, e2e/ui, component     what is checked
      │
cypress/pages        LoginPage, BoardPage (data-cy selectors, no assertions)
cypress/support      commands: resetData, loginAs (cy.session), createTask
                     api.ts (typed cy.request client), schemas.ts (zod)
      │
TaskBoard (app/)     React UI + Node API; POST /api/test/reset before every test

Key engineering decisions

Implemented features

Setup and execution

npm ci
npm test                  # build the app, start it, run all API + UI tests
npm run cy:component      # component tests
npm run cy:open           # interactive runner
npm run cy:demo           # report demo: 1 pass, 2 fail, 1 skip on purpose

Sample test results

Mochawesome report: 64 of 64 end-to-end and API tests passed
HTML report of a full end-to-end run: 64 passed.
Cypress screenshot of a failed demo test with the command log and the task board
Failure screenshot from the report demo: the restored login session, the failed assertion and the board at that moment.

CI workflow

On every push, pull request and night: lint, Prettier, type checks and the app's own tests first; then the API tests, the UI tests on Chrome, Firefox and Edge, and the component tests as parallel jobs. Each job builds and starts its own copy of the app, writes a summary and keeps its HTML report as an artifact.

Known limitations and future improvements

Limitations

Next steps