-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
51 lines (45 loc) · 1.38 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
47
48
49
50
51
const { defineConfig } = require("cypress");
const fs = require("fs-extra");
const path = require("path");
function getConfigurationByFile(file) {
const pathToConfigFile = path.resolve("cypress\\config", `${file}.json`);
if (!fs.existsSync(pathToConfigFile)) {
console.log("No custom config file found.");
return {};
}
return fs.readJson(pathToConfigFile);
}
module.exports = defineConfig({
projectId: '2yydp7',
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
const file = config.env.configFile || 'development'
return getConfigurationByFile(file)
},
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx,feature}",
excludeSpecPattern: "cypress/e2e/other/*js",
baseUrl: "http://www.webdriveruniversity.com/",
chromeWebSecurity: false,
defaultCommandTimeout: 10000,
pageLoadTimeout: 120000,
screenshotOnRunFailure: true,
trashAssetsBeforeRuns: true,
video: false,
viewportHeight: 1080,
viewportWidth: 1920,
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
retries: {
runMode: 0,
openMode: 0,
},
env: {
webdriveruni_homepage: "http://www.webdriveruniversity.com/",
automation_test_store: "https://automationteststore.com/"
}
//baseUrlStore: "https://automationteststore.com/"
},
});