-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathcypress.config.ts
More file actions
53 lines (51 loc) · 1.8 KB
/
cypress.config.ts
File metadata and controls
53 lines (51 loc) · 1.8 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
import path from 'path'
export default defineConfig({
video: false,
e2e: {
baseUrl: 'http://localhost:8000',
specPattern: 'tests/e2e-integration/**/*.spec.{js,jsx,ts,tsx}',
fixturesFolder: 'tests/e2e-integration/fixtures',
screenshotOnRunFailure: false,
video: false,
viewportWidth: 1920,
viewportHeight: 1080,
supportFile: 'tests/support/e2e.ts',
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor(path.resolve(__dirname, './vite.config.ts')))
},
defaultCommandTimeout: 10_000 // https://docs.cypress.io/guides/references/configuration#Timeouts
},
component: {
indexHtmlFile: 'tests/support/component-index.html',
specPattern: ['tests/component/**/*.spec.{js,jsx,ts,tsx}'],
supportFile: 'tests/support/component.ts',
fixturesFolder: 'tests/component/fixtures',
devServer: {
framework: 'react',
bundler: 'vite'
},
setupNodeEvents(on, config) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires
require('@cypress/code-coverage/task')(on, config)
return config
}
},
env: {
backendUrl: 'http://localhost:8000',
oidcClientId: 'test',
oidcAuthorizationEndpoint: 'http://localhost:8000/realms/test/protocol/openid-connect/auth',
oidcTokenEndpoint: 'http://localhost:8000/realms/test/protocol/openid-connect/token',
oidcLogoutEndpoint: 'http://localhost:8000/realms/test/protocol/openid-connect/logout',
oidcLocalStorageKeyPrefix: 'DV_',
languages: [
{ code: 'en', name: 'English' },
{ code: 'es', name: 'Español' }
],
defaultLanguage: 'en',
codeCoverage: {
exclude: ['tests/**/*.*', '**/ErrorPage.tsx']
}
}
})