Commit ca3bfe92 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

browser/test: skip tests accessing http://localhost/

Partially revert 59f3e19d
Tests should work even without a server on localhost (especially for unit tests run by Jenkins or Travis).
parent 0b42c185
......@@ -4,8 +4,9 @@ var page = require('webpage').create();
page.onConsoleMessage = function(msg) { console.log(msg); };
var curdir = phantom.args[0] || fs.workingDirectory;
// curdir = "http://localhost/browser/test/QUnit"
page.open("http://localhost/browser/test/QUnit/test_Qunit.html", function() {
page.open(curdir+"/test_Qunit.html", function() {
setTimeout(function(){
var tap = page.evaluate(function() {
......
......@@ -6,20 +6,23 @@ test("model : load", function() {
equal(m.samples.number, 4, "parse_json > timepoint : number==4");
equal(m.samples.number, m.samples.original_names.length, "parse_json > timepoint : check if array have the expected length");
return
// TODO: not working with phantomjs without localhost server
curdir = "http://localhost/browser/test/QUnit"
stop()
m.loadDataUrl("http://localhost/browser/test/QUnit/testFiles/test.vidjil")
m.loadDataUrl(curdir + "/testFiles/test.vidjil")
setTimeout( function() {
start()
equal(m.samples.number, 3, "loadDataUrl > timepoint : number==3")
equal(m.samples.number, 3, "loadDataUrl from " + curdir + " > timepoint : number==3")
}, 100)
stop()
m.loadAnalysisUrl("http://localhost/browser/test/QUnit/testFiles/test.analysis")
m.loadAnalysisUrl(curdir + "/testFiles/test.analysis")
setTimeout( function() {
start()
equal(m.clone(0).tag, 0, "loadAnalysisUrl() : OK")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment