-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcypress.config.js
More file actions
83 lines (66 loc) · 2.23 KB
/
cypress.config.js
File metadata and controls
83 lines (66 loc) · 2.23 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
require('dotenv').config()
const { defineConfig } = require('cypress')
module.exports = defineConfig({
projectId: "pz79y6",
resolve: {
extensions: [".ts", ".js"],
},
env: {
baseUrl: process.env.BASE_URL, //'https://swproject.demosfortest.com',
},
e2e: {
baseUrl: process.env.BASE_URL, //'https://swproject.demosfortest.com',
/*
Hint to me: This code is part of the setupNodeEvents function and thus executes in the Node environment.
You cannot call Cypress or cy commands in this function, but you do have the direct access
to the file system and the rest of the operating system.
*/
setupNodeEvents(on, config) {
// implement node event listeners here
config.env = {
...process.env,
...config.env
}
//require('@cypress/code-coverage/task')(on, config)
//on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
return config
},
}
})
// const { defineConfig } = require('cypress')
// module.exports = defineConfig({
// // setupNodeEvents can be defined in either
// // the e2e or component configuration
// component: {
// devServer(cypressConfig) {
// // component testing dev server setup code
// },
// setupNodeEvents(on, config) {
// // component testing node events setup code
// },
// },
// e2e: {
// setupNodeEvents(on, config) {
// require('@cypress/code-coverage/task')(on, config)
// //on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
// // include any other plugin code...
// // It's IMPORTANT to return the config object
// // with any changed environment variables
// return config
// }
// }
// })
// const { defineConfig } = require('cypress')
// module.exports = defineConfig({
// // setupNodeEvents can be defined in either
// // the e2e or component configuration
// e2e: {
// setupNodeEvents(on, config) {
// require('@cypress/code-coverage/task')(on, config)
// // include any other plugin code...
// // It's IMPORTANT to return the config object
// // with any changed environment variables
// return config
// }
// }
// })