From 9022e3ee8b7b6c23954a84820ec1251e3dc0444e Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 29 Dec 2018 13:26:54 +0000 Subject: [PATCH] updates to work with PhantomJS 2.x --- xt/js/run_qunit.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xt/js/run_qunit.js b/xt/js/run_qunit.js index c6d236f5..2412d3fa 100644 --- a/xt/js/run_qunit.js +++ b/xt/js/run_qunit.js @@ -1,3 +1,4 @@ +var system = require('system'); /** * Wait until the test condition is true or a timeout occurs. Useful for waiting * on a server response or for a ui change (fadeIn, etc.) to occur. @@ -34,7 +35,7 @@ function waitFor(testFx, onReady, timeOutMillis) { }; -if (phantom.args.length === 0 || phantom.args.length > 2) { +if (system.args.length === 0 || system.args.length > 2) { console.log('Usage: run-qunit.js URL'); phantom.exit(1); } @@ -46,7 +47,7 @@ page.onConsoleMessage = function(msg) { console.log(msg); }; -page.open(phantom.args[0], function(status){ +page.open(system.args[1], function(status){ if (status !== "success") { console.log("Unable to access network"); phantom.exit(1);