forked from elabftw/elabftw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
53 lines (52 loc) · 1.89 KB
/
cypress.config.ts
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 htmlvalidate from 'cypress-html-validate/plugin';
import { Severity } from 'html-validate';
export default defineConfig({
fixturesFolder: 'tests/cypress/fixtures',
screenshotsFolder: 'tests/cypress/screenshots',
videosFolder: 'tests/cypress/videos',
video: true,
videoCompression: false,
viewportWidth: 1440,
viewportHeight: 900,
e2e: {
setupNodeEvents(on, config) {
htmlvalidate.install(
on,
{
extends: [
'html-validate:document',
'html-validate:standard',
'html-validate:a11y',
],
rules: {
'heading-level': Severity.DISABLED, // should be WARN but does not work, TODO: fix violations
'require-sri': [Severity.ERROR, {
target: 'crossorigin',
exclude: ['https://elabtmp'], // this is treated as crossorigin so we exclude it
}],
},
},
{
exclude: [
'#sketcher_search_dialog', // chemdoodle 2d-sketcher
'#bs-select-1', // bootstrap select does not use native select element
'#bs-select-2', // bootstrap select does not use native select element
'#scheduler', // scheduler on the team page has several violations
'h3[data-action="toggle-next"]', // these get the attribute role='button' ...
'h4[data-action="toggle-next"]', // ... hence, trigger prefer-native-element
],
},
);
return require('./tests/cypress/plugins/index.ts')(on, config);
},
baseUrl: 'https://elab.local:3148',
specPattern: 'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/cypress/support/index.ts',
},
// give more time because Xdebug slows down php a bit
defaultCommandTimeout: 8000,
requestTimeout: 10000,
responseTimeout: 130000,
taskTimeout: 300000,
});