[PR #7] [MERGED] feat: add Cypress end-to-end tests for login functionality and CI configuration #69

Closed
opened 2026-05-06 12:18:34 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/BreizhHardware/Site-comptage-heure/pull/7
Author: @BreizhHardware
Created: 10/18/2025
Status: Merged
Merged: 10/18/2025
Merged by: @BreizhHardware

Base: mainHead: dev


📝 Commits (7)

  • 94ed954 feat: add Cypress end-to-end tests for login functionality and CI configuration
  • 3560002 feat: enhance user seeding with UUIDs and improve code formatting in various files
  • bef0e77 feat: update CI configuration to rename 'ci' script to 'ci:run'
  • 1cf674a fix: correct formatting in README and update CI script to use npx for server start
  • fc13c94 feat: update CI configuration and disable Cypress support file
  • 1994ed5 feat: update file upload paths and add dynamic file retrieval endpoint
  • 1761fa4 feat: add environment variables for CI and update login test selectors

📊 Changes

17 files changed (+1454 additions, -40 deletions)

View changed files

.github/workflows/ci.yml (+26 -0)
📝 .gitignore (+1 -0)
📝 Dockerfile (+1 -1)
📝 README.md (+1 -1)
📝 app/admin/page.tsx (+26 -13)
📝 app/api/upload/route.ts (+2 -2)
app/api/uploads/[filename]/route.ts (+31 -0)
📝 app/dashboard/page.tsx (+10 -7)
📝 components/Header.tsx (+9 -6)
📝 components/providers.tsx (+1 -3)
📝 context/SettingsContext.tsx (+13 -3)
cypress.config.ts (+11 -0)
cypress/e2e/login.cy.ts (+9 -0)
📝 docker-compose.yml (+1 -1)
📝 package.json (+8 -1)
📝 pnpm-lock.yaml (+1271 -2)
scripts/seed-test.js (+33 -0)

📄 Description

This pull request introduces end-to-end (E2E) testing infrastructure using Cypress, integrates it into the CI workflow, and adds a test user seeding script to support authentication tests. The main themes are E2E test setup, CI integration, and test data management.

E2E Testing Setup:

  • Added Cypress as a dev dependency and created a basic configuration in cypress.config.ts for E2E tests. [1] [2]
  • Implemented a sample login E2E test in cypress/e2e/login.cy.ts, verifying user authentication flow.

Continuous Integration (CI):

  • Added a GitHub Actions workflow in .github/workflows/ci.yml to run E2E tests on pull requests, including setup for Node, pnpm, Prisma, and Cypress.
  • Updated package.json scripts to support Cypress commands and a full CI pipeline (ci script runs build, starts server, and executes E2E tests).

Test Data Management:

  • Added scripts/seed-test.js to programmatically create a test user in the database, ensuring a consistent environment for authentication tests.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BreizhHardware/Site-comptage-heure/pull/7 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 10/18/2025 **Status:** ✅ Merged **Merged:** 10/18/2025 **Merged by:** [@BreizhHardware](https://github.com/BreizhHardware) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (7) - [`94ed954`](https://github.com/BreizhHardware/Site-comptage-heure/commit/94ed954dc10ce48327ea359b1a1b7e01836bafd3) feat: add Cypress end-to-end tests for login functionality and CI configuration - [`3560002`](https://github.com/BreizhHardware/Site-comptage-heure/commit/35600023b72865d0c664f74aed309badc6a45853) feat: enhance user seeding with UUIDs and improve code formatting in various files - [`bef0e77`](https://github.com/BreizhHardware/Site-comptage-heure/commit/bef0e7716d1233e403b9debd4af02a848ce5c737) feat: update CI configuration to rename 'ci' script to 'ci:run' - [`1cf674a`](https://github.com/BreizhHardware/Site-comptage-heure/commit/1cf674a706dd3ccbb465cdf7ef4fe48d75acf268) fix: correct formatting in README and update CI script to use npx for server start - [`fc13c94`](https://github.com/BreizhHardware/Site-comptage-heure/commit/fc13c94d5f7635f16f7df08a8a8eaef664c0189c) feat: update CI configuration and disable Cypress support file - [`1994ed5`](https://github.com/BreizhHardware/Site-comptage-heure/commit/1994ed5810aa0111afee5e907718de883950b5c6) feat: update file upload paths and add dynamic file retrieval endpoint - [`1761fa4`](https://github.com/BreizhHardware/Site-comptage-heure/commit/1761fa4f45552b00204aca6e42de40d44e34bb8b) feat: add environment variables for CI and update login test selectors ### 📊 Changes **17 files changed** (+1454 additions, -40 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/ci.yml` (+26 -0) 📝 `.gitignore` (+1 -0) 📝 `Dockerfile` (+1 -1) 📝 `README.md` (+1 -1) 📝 `app/admin/page.tsx` (+26 -13) 📝 `app/api/upload/route.ts` (+2 -2) ➕ `app/api/uploads/[filename]/route.ts` (+31 -0) 📝 `app/dashboard/page.tsx` (+10 -7) 📝 `components/Header.tsx` (+9 -6) 📝 `components/providers.tsx` (+1 -3) 📝 `context/SettingsContext.tsx` (+13 -3) ➕ `cypress.config.ts` (+11 -0) ➕ `cypress/e2e/login.cy.ts` (+9 -0) 📝 `docker-compose.yml` (+1 -1) 📝 `package.json` (+8 -1) 📝 `pnpm-lock.yaml` (+1271 -2) ➕ `scripts/seed-test.js` (+33 -0) </details> ### 📄 Description This pull request introduces end-to-end (E2E) testing infrastructure using Cypress, integrates it into the CI workflow, and adds a test user seeding script to support authentication tests. The main themes are E2E test setup, CI integration, and test data management. **E2E Testing Setup:** * Added Cypress as a dev dependency and created a basic configuration in `cypress.config.ts` for E2E tests. [[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R49) [[2]](diffhunk://#diff-3f62e885350a48939f240b9daf40f6b06d41da7751f2b613238fc7669ac0a1b2R1-R10) * Implemented a sample login E2E test in `cypress/e2e/login.cy.ts`, verifying user authentication flow. **Continuous Integration (CI):** * Added a GitHub Actions workflow in `.github/workflows/ci.yml` to run E2E tests on pull requests, including setup for Node, pnpm, Prisma, and Cypress. * Updated `package.json` scripts to support Cypress commands and a full CI pipeline (`ci` script runs build, starts server, and executes E2E tests). **Test Data Management:** * Added `scripts/seed-test.js` to programmatically create a test user in the database, ensuring a consistent environment for authentication tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:18:34 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BreizhHardware/Site-comptage-heure#69
No description provided.