-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
46 lines (45 loc) · 1.26 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
46
const { defineConfig } = require("cypress");
module.exports = defineConfig({
defaultCommandTimeout: 5000,
video: false,
screenshotOnRunFailure: false,
chromeWebSecurity: false,
retries: 0,
viewportWidth: 1920,
viewportHeight: 1080,
e2e: {
setupNodeEvents(on, config) {
if (config.env.prod) {
return {
baseUrl: "https://demoqa.com",
env: {
env: "prod",
apiUrl: "https://demoqa.com",
apiGenerateToken: "/Account/v1/GenerateToken",
apiLogin: "/Account/v1/Login",
apiAuthorized: "/Account/v1/Authorized",
apiUser: "/Account/v1/User",
login: "/login",
profile: "/profile",
books: "/books"
},
};
} else
return {
//Change these values with values from another environment
baseUrl: "https://demoqa.com",
env: {
env: "staging",
apiUrl: "https://demoqa.com",
apiGenerateToken: "/Account/v1/GenerateToken",
apiLogin: "/Account/v1/Login",
apiAuthorized: "/Account/v1/Authorized",
apiUser: "/Account/v1/User",
login: "/login",
profile: "/profile",
books: "/books"
},
};
},
},
});