From: Michael Wood Date: Mon, 4 Apr 2016 10:49:37 +0000 (+0100) Subject: toaster: testsjs Add call back to append elements on completion of tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81798ab046b0717614e28e0a339172f3803e451b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git toaster: testsjs Add call back to append elements on completion of tests When the tests are complete add some marker elements to the test page DOM which can then looked at for a selenium browser test. Signed-off-by: Michael Wood Signed-off-by: Elliot Smith --- diff --git a/lib/toaster/toastergui/static/js/tests/test.js b/lib/toaster/toastergui/static/js/tests/test.js index aac0ba60a21..2b62118d01b 100644 --- a/lib/toaster/toastergui/static/js/tests/test.js +++ b/lib/toaster/toastergui/static/js/tests/test.js @@ -2,6 +2,13 @@ /* Unit tests for Toaster's JS */ /* libtoaster tests */ +QUnit.done(function(details){ + /* Selenium test will look for these elements to get the results */ + var body = $('body'); + body.append(""+details.failed+""); + body.append(""+details.passed+""); + body.append(""+details.total+""); +}); QUnit.test("Layer alert notification", function(assert) { var layer = {