ci: exécute les tests de composants Cypress
Sans ça, `cypress/component/CheckboxOption.cy.tsx` (commit précédent) ne tournait jamais en CI : `pnpm --filter web e2e` lance `cypress run` sans `--component`, donc uniquement la suite e2e par défaut. - apps/web/package.json : nouveau script `cy:run:component` - ci.yml : étape dédiée après `pnpm --filter web e2e`, sans start-server-and-test (Cypress lance son propre dev server Vite en interne pour le component testing, pas besoin d'attendre l'appli comme pour l'e2e)
This commit is contained in:
parent
70a77ddf0f
commit
a3c242bfa5
2 changed files with 7 additions and 1 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -104,3 +104,8 @@ jobs:
|
|||
# explicitly so `cypress run` finds it.
|
||||
- run: pnpm --filter web exec cypress install
|
||||
- run: pnpm --filter web e2e
|
||||
# No dev server needed here — Cypress spins up its own Vite dev
|
||||
# server internally for component testing (see cypress.config.ts's
|
||||
# `component.devServer`), unlike `e2e` above which needs the real app
|
||||
# running first.
|
||||
- run: pnpm --filter web cy:run:component
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
"test": "echo \"no unit tests yet\" && exit 0",
|
||||
"cy:open": "cypress open",
|
||||
"cy:run": "cypress run",
|
||||
"e2e": "start-server-and-test dev http://localhost:5173 cy:run"
|
||||
"e2e": "start-server-and-test dev http://localhost:5173 cy:run",
|
||||
"cy:run:component": "cypress run --component"
|
||||
},
|
||||
"dependencies": {
|
||||
"@batch-cooking/date-tools": "workspace:*",
|
||||
|
|
|
|||
Loading…
Reference in a new issue