Files
Anthias/static/spec/phantom-runner.js
over 2c35385164 gt# This is a combination of 14 commits.
integration with travis CI via pahntomjs

implement correct exit codes for phantom-runner

integrate with Travis #1

integration with Travis #2

where is phantomjs

try another way

add shebang

try another way

another way

drop web-tests-runner.sh

try broken tests

check phantomjs version

fix?

fix tests
2016-08-26 12:35:10 +06:00

24 lines
522 B
JavaScript

var webPage = require('webpage');
var page = webPage.create();
var url = 'http://localhost:8080/static/spec/runner.html';
page.onConsoleMessage = function(msg, lineNum, sourceId) {
console.log(msg);
};
page.onInitialized = function() {
page.evaluate(function() {
window.inPhantom = true;
});
};
page.open(url, function (status) {
if(status !== 'success') {
console.log('cannot load page ' + url);
phantom.exit(1);
}
});
page.onConfirm = function(status) {
phantom.exit(status);
};