Skip to content

Commit

Permalink
Fixed safari execution on saucy
Browse files Browse the repository at this point in the history
  • Loading branch information
tompahoward committed Nov 1, 2020
1 parent bb6a463 commit 3d56fcf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
}
],
"istanbul/no-ignore-file": "error",
"istanbul/prefer-ignore-reason": "error"
"istanbul/prefer-ignore-reason": "error",
"promise/no-callback-in-promise": "off"
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"cover:browser-api:firefox:local": "scripts/cover.sh",
"cover:browser-api:firefox:saucy": "scripts/cover.sh",
"cover:browser-api:safari:local": "scripts/cover.sh",
".cover:browser-api:safari:saucy": "scripts/cover.sh",
"cover:browser-api:safari:saucy": "scripts/cover.sh",
"cover:browser-api": "scripts/for-all-browsers.sh",
"cover": "scripts/cover-all.sh",
"eslint-check": "eslint --print-config src/server/index.js | eslint-config-prettier-check",
Expand Down
9 changes: 6 additions & 3 deletions src/test/clients/waychaser-via-webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ import logging from 'selenium-webdriver/lib/logging';

class WaychaserViaWebdriver {
async load(url, options) {
const result = await this.driver.executeScript(
const result = await this.driver.executeAsyncScript(
/* istanbul ignore next: won't work in browser otherwise */
function () {
/* global window */
var callback = arguments[arguments.length - 1];
return window.waychaser
.load(arguments[0], arguments[1])
.then((success) => {
console.log({ success });
return { success, result: 'success' };
callback({ success, result: 'success' });
return;
})
.catch((error) => {
console.log({ error });
return { error, result: 'error' };
callback({ error, result: 'error' });
return;
});
},
url,
Expand Down

0 comments on commit 3d56fcf

Please sign in to comment.