From abfd095a05f70e1f2a80c6491d2a5d19593d4824 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 4 Apr 2016 11:49:37 +0100 Subject: [PATCH] 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 --- bitbake/lib/toaster/toastergui/static/js/tests/test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/static/js/tests/test.js b/bitbake/lib/toaster/toastergui/static/js/tests/test.js index aac0ba60a2..2b62118d01 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 = {