Skip to content

Commit 3a31be6

Browse files
Chasen Le Harachasenlehara
authored andcommitted
Set up Sauce Labs
1 parent a52dc77 commit 3a31be6

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
language: node_js
2-
node_js: node
2+
node_js: 10
33
dist: xenial
4+
addons:
5+
firefox: latest
6+
sauce_connect: true
7+
before_script:
8+
- npm run http-server &
9+
- sleep 2
10+
script: npm run ci
411
services:
512
- xvfb

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"url": "donejs.com"
1414
},
1515
"scripts": {
16+
"ci": "npm run test && node test-saucelabs.js",
17+
"http-server": "http-server -p 3000 --silent",
1618
"preversion": "npm test",
1719
"postpublish": "git push --tags && git push",
1820
"testee": "testee test.html --browsers firefox",
@@ -51,10 +53,12 @@
5153
"devDependencies": {
5254
"can-define": "^2.0.3",
5355
"can-test-helpers": "^1.1.2",
56+
"http-server": "^0.11.0",
5457
"jshint": "^2.9.1",
5558
"steal": "^2.2.1",
5659
"steal-qunit": "^2.0.0",
5760
"steal-tools": "^2.2.1",
61+
"test-saucelabs": "^0.0.6",
5862
"testee": "^0.9.0"
5963
},
6064
"license": "MIT"

test-ie.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!doctype html>
2+
<title>can-query-logic</title>
3+
<script src="node_modules/steal/steal-with-promises.js" main="can-query-logic/can-query-logic-test"></script>
4+
<div id="qunit-fixture"></div>

test-saucelabs.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
"use strict";
2+
3+
var SauceLabs = require("test-saucelabs");
4+
5+
var maxDuration = 10800; // seconds, default 1800, max 10800
6+
var commandTimeout = 600; // seconds, default 300, max 600
7+
var idleTimeout = 1000; // seconds, default 90, max 1000
8+
9+
// https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
10+
var platforms = [{
11+
browserName: "safari",
12+
platform: "OS X 10.13",
13+
version: "11"
14+
}, {
15+
browserName: "MicrosoftEdge",
16+
platform: "Windows 10"
17+
}, {
18+
browserName: "firefox",
19+
platform: "Windows 10",
20+
version: "latest"
21+
}, {
22+
browserName: "googlechrome",
23+
platform: "Windows 10"
24+
}, {
25+
browserName: "Safari",
26+
"appium-version": "1.12.1",
27+
platformName: "iOS",
28+
platformVersion: "12.2",
29+
deviceName: "iPhone XS Simulator"
30+
}];
31+
32+
SauceLabs({
33+
urls: [{
34+
name: "can-query-logic",
35+
url : 'http://localhost:3000/test-ie.html?hidepassed',
36+
platforms: [{
37+
browserName: 'internet explorer',
38+
platform: 'Windows 10',
39+
version: '11.0',
40+
maxDuration: maxDuration,
41+
commandTimeout: commandTimeout,
42+
idleTimeout: idleTimeout
43+
}]
44+
}, {
45+
name: "can-query-logic",
46+
url: "http://localhost:3000/test.html?hidepassed",
47+
platforms: platforms
48+
}],
49+
runInSeries: true,
50+
zeroAssertionsPass: false
51+
});

0 commit comments

Comments
 (0)