Skip to content

Commit

Permalink
CasperJS tests now runs correctly on Travis CI, remove debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasrosdal committed Apr 24, 2015
1 parent 5ee156b commit 8589d93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions scripts/freeciv-web-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,7 @@ echo "Start testing of Freeciv-web using CasperJS:"
cd ${basedir}/tests/casperjs-1.1-beta3/bin
xvfb-run ./casperjs --engine=slimerjs test ${basedir}/tests/freeciv-web-tests.js || (>&2 echo "Freeciv-web CasperJS tests failed!" && exit 1)

echo "Freeciv-web CasperJS tests run successfully!"

echo "=============================="
echo "Freeciv-web built and started correctly: Build successful!"
7 changes: 2 additions & 5 deletions tests/freeciv-web-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ casper.test.begin('Test starting new Freeciv-web game', 10, function suite(test)
/* Starting new game automatically from Javascript.*/
if (validate_username()) {
$("#dialog").dialog('close');
setTimeout("pregame_start_game();", 2000);
setTimeout("pregame_start_game();", 1000);
}
});

Expand All @@ -99,9 +99,7 @@ casper.test.begin('Test starting new Freeciv-web game', 10, function suite(test)
format: 'png',
quality: 100
});
}, function() {
this.debugHTML();
}, 10000);
});

casper.then(function() {
this.echo("Checking that JavaScript objects in browser memory are as expected.");
Expand Down Expand Up @@ -162,7 +160,6 @@ casper.test.begin('Test starting new Freeciv-web game', 10, function suite(test)
});

casper.run(function() {
this.echo("Freeciv-web CasperJS tests run successfully!");
test.done();
});
});

0 comments on commit 8589d93

Please sign in to comment.