Skip to content

Commit

Permalink
fix(test): fix ci tests
Browse files Browse the repository at this point in the history
- add additional config for ci tests
  • Loading branch information
cgawron committed Nov 4, 2024
1 parent b1c8ac0 commit a3a4dca
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions client/cypress_ci.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from 'cypress'
import { GenerateCtrfReport } from 'cypress-ctrf-json-reporter'
import coverageTask from "@cypress/code-coverage/task";


const PORT = process.env.PORT || 5173;

export default defineConfig({
e2e: {
env: {
REACT_APP_API_URL: '/api/v1'
},
baseUrl: `http://localhost:${PORT}`,
video: true,
projectId: "pjkkoc",
setupNodeEvents(on, config) {
// Implement node event listeners here

new GenerateCtrfReport({
on,
outputFile: 'client-report.json',
outputDir: '../ctrf',
})
coverageTask(on, config)
return config
},
},
})
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"start-test": "VITE_COVERAGE=true vite --mode test",
"build": "vite build",
"test": "npx cypress run --spec cypress/e2e/integration/*.cy.js --headless",
"cy:ci": "TZ=Europe/Berlin cypress run --headless --e2e",
"cy:ci": "TZ=Europe/Berlin cypress run -C cypress_ci.config.ts --headless --e2e",
"ci": "start-server-and-test start-test http://localhost:5173/meeting cy:ci"
},
"eslintConfig": {
Expand Down

0 comments on commit a3a4dca

Please sign in to comment.