forked from incubateur-ademe/nosgestesclimat-site-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
34 lines (32 loc) · 866 Bytes
/
cypress.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { addMatchImageSnapshotPlugin } from '@simonsmith/cypress-image-snapshot/plugin'
import { defineConfig } from 'cypress'
import dotenv from 'dotenv'
dotenv.config()
export default defineConfig({
projectId: 'bkkrae',
viewportWidth: 1920,
viewportHeight: 960,
env: {
localisation_param: 'FR',
language_param: 'fr',
testLangURL: process.env.CYPRESS_testLangURL ?? 'fr',
server_url: process.env.CYPRESS_baseUrl
? 'nosgestesclimat.osc-fr1.scalingo.io'
: 'localhost:3001',
...process.env,
},
e2e: {
baseUrl: process.env.CYPRESS_baseUrl ?? 'http://localhost:3000',
setupNodeEvents(on) {
addMatchImageSnapshotPlugin(on)
},
experimentalRunAllSpecs: true,
specPattern: 'cypress/e2e/**/*.cy.js',
},
component: {
devServer: {
framework: 'next',
bundler: 'webpack',
},
},
})