-
Notifications
You must be signed in to change notification settings - Fork 4
/
cypress.config.js
45 lines (42 loc) · 1.15 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
const { defineConfig } = require('cypress')
const cypressReplay = require("@replayio/cypress")
const { phpVersion, core } = require('./.wp-env.json')
const wpVersion = /[^/]*$/.exec(core)[0]
module.exports = defineConfig({
env: {
wpUsername: 'admin',
wpPassword: 'password',
wpVersion,
phpVersion,
},
downloadsFolder: 'tests/cypress/downloads',
fixturesFolder: 'tests/cypress/fixtures',
screenshotsFolder: 'tests/cypress/screenshots',
video: true,
videosFolder: 'tests/cypress/videos',
videoUploadOnPasses: false,
chromeWebSecurity: false,
viewportWidth: 1024,
viewportHeight: 768,
blockHosts: [
'*doubleclick.net',
'*jnn-pa.googleapis.com',
'*youtube.com',
],
e2e: {
setupNodeEvents(on, config) {
const semver = require('semver');
// Setup Replay
cypressReplay.default(on, config);
// Ensure that the base URL is always properly set.
if (config.env && config.env.baseUrl) {
config.baseUrl = config.env.baseUrl;
}
return config;
},
baseUrl: 'http://localhost:8882',
specPattern: 'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/cypress/support/index.js',
testIsolation: false,
},
})