forked from ganlanyuan/tiny-slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
browserstack.conf.js
99 lines (94 loc) · 2.43 KB
/
browserstack.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
nightwatch_config = {
src_folders : [ 'test/scripts' ],
selenium : {
'start_process': false,
'host': 'hub-cloud.browserstack.com',
'port': 80
},
common_capabilities: {
'browserstack.user': '${BS_USERNAME}',
'browserstack.key': '${BS_ACCESS_KEY}'
},
test_settings: {
default: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Chrome',
'browser_version': '14.0',
'resolution': '1024x768'
}
},
chrome: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Chrome',
'browser_version': '14.0',
'resolution': '1024x768'
}
},
firefox: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Firefox',
'browser_version': '12.0',
'resolution': '1024x768'
}
},
ie: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'IE',
'browser_version': '9.0',
'resolution': '1024x768'
}
},
edge: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '10',
'browser': 'Edge',
'browser_version': '15.0',
'resolution': '1024x768'
}
},
safari: {
desiredCapabilities: {
'os': 'OS X',
'os_version': 'Snow Leopard',
'browser': 'Safari',
'browser_version': '5.1',
'resolution': '1024x768'
}
},
opera: {
desiredCapabilities: {
'os': 'Windows',
'os_version': '7',
'browser': 'Opera',
'browser_version': '12.15',
'resolution': '1024x768'
}
},
}
};
// Code to support common capabilites
for(var i in nightwatch_config.test_settings){
var config = nightwatch_config.test_settings[i],
browser_name = i;
config['selenium_host'] = nightwatch_config.selenium.host;
config['selenium_port'] = nightwatch_config.selenium.port;
config['desiredCapabilities'] = config['desiredCapabilities'] || {};
config['globals'] = {
'browser_name': browser_name,
'abortOnAssertionFailure': false
};
for(var j in nightwatch_config.common_capabilities){
config['desiredCapabilities'][j] = config['desiredCapabilities'][j] || nightwatch_config.common_capabilities[j];
// config['desiredCapabilities']['browserstack.local'] = true;
}
}
module.exports = nightwatch_config;