Skip to content

Commit

Permalink
chore: Upgrade saucie to latest (#540)
Browse files Browse the repository at this point in the history
add QUnit test logs for SauceLabs
use new settings for testem SL launchers
  • Loading branch information
bantic authored Mar 9, 2017
1 parent 3155800 commit 9662756
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 251 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"conventional-changelog-cli": "^1.2.0",
"jquery": "^3.0.0",
"jsdoc": "^3.4.2",
"saucie": "1.4.1",
"saucie": "^3.1.0",
"testem": "^1.7.4"
},
"main": "dist/commonjs/mobiledoc-kit/index.js"
Expand Down
27 changes: 13 additions & 14 deletions testem-ci.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
{
"framework": "qunit",
"parallel": 6,
"parallel": 5,
"disable_watching": true,
"timeout": 600,
"browser_start_timeout": 90,
"test_page": "dist/tests/index.html?hidepassed",
"on_start": "./sauce_labs/saucie-connect.js",
"on_exit": "./sauce_labs/saucie-disconnect.js",
"port": 8080,
"src_files": [
"tests/**/*.js",
"src/**/*.js"
],
"launchers": {
"SL_Chrome_Current": {
"exe": "saucie",
"args": ["-b", "chrome", "--no-ct", "-u"],
"args": ["-b", "chrome", "-p", "Windows 10", "-v", "latest", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_MS_Edge": {
"exe": "saucie",
"args": ["-b", "microsoftedge", "--no-ct", "-u"],
"args": ["-b", "microsoftedge", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_IE_11": {
"exe": "saucie",
"args": ["-b", "internet explorer", "-v", "11", "--no-ct", "-u"],
"args": ["-b", "internet explorer", "-v", "11", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_Firefox_Current": {
"exe": "saucie",
"args": ["-b", "firefox", "--no-ct", "-u"],
"args": ["-b", "firefox", "-p", "Windows 10", "-v", "latest", "--no-connect", "-u"],
"protocol": "tap"
},
"SL_Safari_9": {
"SL_Safari_Current": {
"exe": "saucie",
"args": ["-b", "safari", "-v", "9", "--no-ct", "-u"],
"args": ["-b", "safari", "-v", "9", "--no-connect", "-u"],
"protocol": "tap"
}
},
"launch_in_ci": [
"PhantomJS",
"SL_Firefox_Current",
"SL_Chrome_Current",
"SL_Safari_Current",
"SL_MS_Edge",
"SL_IE_11",
"SL_Firefox_Current",
"SL_Safari_9"
"SL_IE_11"
],
"launch_in_dev": [
"PhantomJS",
Expand Down
28 changes: 28 additions & 0 deletions tests/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,34 @@ QUnit.testStart(() => {
$('<div id="editor"></div>').appendTo('#qunit-fixture');
});

let sauceLog = [];

QUnit.done(function (test_results) {
var tests = [];
for(var i = 0, len = sauceLog.length; i < len; i++) {
var details = sauceLog[i];
tests.push({
name: details.name,
result: details.result,
expected: details.expected,
actual: details.actual,
source: details.source
});
}
test_results.tests = tests;

window.global_test_results = test_results;
});

QUnit.testStart(function(testDetails){
QUnit.log(function(details){
if (!details.result) {
details.name = testDetails.name;
sauceLog.push(details);
}
});
});

export default {
dom: DOMHelpers,
mobiledoc: MobiledocHelpers,
Expand Down
Loading

0 comments on commit 9662756

Please sign in to comment.