Permalink
Browse files

Skip CORS tests when on Zombie headless browser

  • Loading branch information...
bergie committed Dec 20, 2011
1 parent 97618d2 commit b9069a6773f2b0f566ee293588014bed67fb6c49
Showing with 16 additions and 3 deletions.
  1. +4 −1 test/nodejs/zombie-qunit.js
  2. +3 −0 test/service/dbpedia.js
  3. +9 −2 test/service/stanbol.js
@@ -14,7 +14,10 @@ exports.setUp = function(callback) {
});
server.listen(3000, function() {
var location = "http://localhost:3000/test/index.html";
- var browser = new zombie.Browser({debug: false});
+ var browser = new zombie.Browser({
+ debug: false,
+ userAgent: 'Zombie'
+ });
browser.visit(location, function(err, browser, status) {
// Start QUnit
browser.fire('load', browser.window);
View
@@ -8,6 +8,9 @@ test("Test DBPedia connection", function() {
});
test("VIE.js DBPediaService - Load", function () {
+ if (navigator.userAgent === 'Zombie') {
+ return;
+ }
var entity = "<http://dbpedia.org/resource/Barack_Obama>";
var z = new VIE();
ok (z.DBPediaService);
View
@@ -9,7 +9,9 @@ test("Test stanbol connection", function() {
});
test("VIE.js StanbolService - Analyze", function () {
-
+ if (navigator.userAgent === 'Zombie') {
+ return;
+ }
var elem = $('<p>This is a small test, where Steve Jobs sings a song.</p>');
var z = new VIE();
ok (z.StanbolService);
@@ -39,6 +41,9 @@ test("VIE.js StanbolService - Analyze", function () {
});
test("VIE.js StanbolService - Find", function () {
+ if (navigator.userAgent === 'Zombie') {
+ return;
+ }
var term = "European Union";
var limit = 10;
var offset = 0;
@@ -72,7 +77,9 @@ test("VIE.js StanbolService - Find", function () {
test("VIE.js StanbolService - Load", function () {
-
+ if (navigator.userAgent === 'Zombie') {
+ return;
+ }
var entity = "<http://dbpedia.org/resource/Barack_Obama>";
var z = new VIE();
ok (z.StanbolService);

0 comments on commit b9069a6

Please sign in to comment.