-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathcypress-public.config.ts
53 lines (52 loc) · 1.59 KB
/
cypress-public.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 { setAllowedTerminalIpAddresses } from './cypress/local-only/support/database';
import { toggleFeatureFlag } from './cypress/helpers/cypressTasks/dynamo/dynamo-helpers';
import fs from 'fs';
import path from 'path';
// eslint-disable-next-line import/no-default-export
export default defineConfig({
defaultCommandTimeout: 20000,
e2e: {
baseUrl: 'http://localhost:5678',
setupNodeEvents(on) {
on('task', {
modifyDeployedDateTextFile(deployedDate) {
fs.writeFileSync(
path.join(__dirname, './dist-public/deployed-date.txt'),
deployedDate,
);
return null;
},
setAllowedTerminalIpAddresses(ipAddresses) {
return setAllowedTerminalIpAddresses(ipAddresses);
},
table(message) {
console.table(message);
return null;
},
toggleFeatureFlag(args) {
return toggleFeatureFlag(args);
},
});
},
specPattern: [
'cypress/local-only/tests/integration/public/**/*.cy.ts',
'cypress/local-only/tests/accessibility/public/**/*.cy.ts',
],
supportFile: 'cypress/local-only/support/index.ts',
testIsolation: false,
},
fixturesFolder: 'cypress/local-only/fixtures',
reporter: 'spec',
reporterOptions: {
toConsole: true,
},
requestTimeout: 12000,
screenshotOnRunFailure: false,
screenshotsFolder: 'cypress/local-only/screenshots',
video: true,
videosFolder: 'cypress/local-only/videos',
viewportHeight: 900,
viewportWidth: 1200,
watchForFileChanges: false,
});