From: Michael Wood Date: Mon, 4 Apr 2016 10:49:37 +0000 (+0100) Subject: bitbake: toaster: testsjs Add call back to append elements on completion of tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abfd095a05f70e1f2a80c6491d2a5d19593d4824;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: 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. (Bitbake rev: 81798ab046b0717614e28e0a339172f3803e451b) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/toastergui/static/js/tests/test.js b/bitbake/lib/toaster/toastergui/static/js/tests/test.js index aac0ba60a21..2b62118d01b 100644 --- a/bitbake/lib/toaster/toastergui/static/js/tests/test.js +++ b/bitbake/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 = {