-
Notifications
You must be signed in to change notification settings - Fork 7
/
nightwatch.conf.js
106 lines (91 loc) · 2.14 KB
/
nightwatch.conf.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
"use strict";
const {
SAUCE_USERNAME,
SAUCE_ACCESS_KEY,
GITHUB_RUN_NUMBER,
GITHUB_EVENT_NAME,
} = process.env;
const browserslist = require("browserslist");
const FIREFOX_ESR_VERSION =
Number.parseInt(
browserslist("Firefox ESR")[0].replace(/^firefox\s+([\d.]+)$/i, "$1"),
) + "";
/** @type {import("nightwatch").NightwatchOptions} */
module.exports = {
src_folders: "test/browser",
output_folder: "test_report",
plugins: ["nightwatch-saucelabs-endsauce"],
test_settings: {
default: {
use_ssl: true,
silent: true,
selenium: {
host: "ondemand.saucelabs.com",
port: 443,
start_process: false,
},
request_timeout_options: {
timeout: 60000,
retry_attempts: 5,
},
desiredCapabilities: {
javascriptEnabled: true,
acceptSslCerts: true,
// SauceLabs options
"sauce:options" : {
username: SAUCE_USERNAME,
accessKey: SAUCE_ACCESS_KEY,
extendedDebugging: true,
build: GITHUB_EVENT_NAME === "push"
? `build-${GITHUB_RUN_NUMBER}`
: undefined,
public: "public",
},
},
},
chrome: {
desiredCapabilities: {
browserName: "chrome",
browserVersion: "latest",
platformName: "windows",
},
},
chrome_old: {
desiredCapabilities: {
browserName: "chrome",
browserVersion: "latest-1",
platformName: "windows",
},
},
firefox: {
desiredCapabilities: {
browserName: "firefox",
browserVersion: "latest",
},
},
firefox_old: {
desiredCapabilities: {
browserName: "firefox",
browserVersion: "latest-1",
},
},
firefox_esr: {
desiredCapabilities: {
browserName: "firefox",
browserVersion: FIREFOX_ESR_VERSION,
},
},
safari: {
desiredCapabilities: {
browserName: "safari",
browserVersion: "latest",
},
},
safari_old: {
desiredCapabilities: {
browserName: "safari",
browserVersion: "latest-1",
},
},
},
};