forked from Vardot/varbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightwatch.conf.js
133 lines (122 loc) · 3.84 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
const Services = {}; loadServices();
module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: ['tests/step-definitions','node_modules/webship-js/tests/step-definitions'],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
custom_commands_path: './node_modules/webship-js/lib/custom-commands',
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
custom_assertions_path: './node_modules/webship-js/lib/custom-assertions',
test_runner: {
type: 'cucumber',
options: {
feature_path: 'tests/features/varbase/*.feature',
additional_config: '',
parallel: 2,
},
},
globals: {
"assets_folder" : "/assets/",
users: {
"webmaster":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"Normal user":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"Editor":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"Content admin":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"SEO admin":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"Site admin":{
"email": "[email protected]",
"password": "dD.123123ddd"},
"Super admin":{
"email": "[email protected]",
"password": "dD.123123ddd"}
}
},
test_settings: {
default: {
launch_url: 'http://varbase.test',
start_process: true,
selenium_port: 4445,
selenium_host: '127.0.0.1',
silent: true,
screenshots: {
enabled: true,
path: './reports/screenshots',
},
desiredCapabilities: {
browserName: 'chrome',
'goog:chromeOptions': {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: false,
args: [
'--headless',
'--start-maximized',
'--disable-gpu',
'--window-size=1600,1200',
'--no-sandbox',
'--disable-dev-shm-usage',
'--disable-setuid-sandbox',
'--disable-web-security',
'--DNS-prefetch-disable',
'--disable-translate',
'--ignore-certificate-errors',
'--test-type',
'--disable-extensions',
'--incognito',
'--disable-infobars',
'--remote-debugging-port=9222',
'--allowed-ips=*',
'--whitelisted-ips=*',
'--allow-insecure-localhost',
],
},
},
},
},
selenium_server: {
// Selenium Server is running locally and is managed by Nightwatch
selenium: {
start_process: true,
port: 4444,
server_path: (Services.seleniumServer ? Services.seleniumServer.path : ''),
cli_args: {
'webdriver.gecko.driver': (Services.geckodriver ? Services.geckodriver.path : ''),
'webdriver.chrome.driver': (Services.chromedriver ? Services.chromedriver.path : ''),
},
},
webdriver: {
start_process: false
},
},
'selenium.chrome': {
extends: 'selenium_server',
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
w3c: false,
},
},
}
};
function loadServices() {
try {
Services.seleniumServer = require('selenium-server');
} catch (err) { }
try {
Services.chromedriver = require('chromedriver');
} catch (err) { }
try {
Services.geckodriver = require('geckodriver');
} catch (err) { }
}