aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/tests/test.js
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-04-04 11:49:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 08:35:03 +0100
commitabfd095a05f70e1f2a80c6491d2a5d19593d4824 (patch)
treebb845724be94e755aa80587c80cef7a3f755ed5a /bitbake/lib/toaster/toastergui/static/js/tests/test.js
parent099f026bd7a1b3d8fd30fe83f838e5877f4ced7b (diff)
downloadopenembedded-core-contrib-abfd095a05f70e1f2a80c6491d2a5d19593d4824.tar.gz
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 <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/tests/test.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/tests/test.js7
1 files changed, 7 insertions, 0 deletions
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("<span id='tests-failed'>"+details.failed+"</span>");
+ body.append("<span id='tests-passed'>"+details.passed+"</span>");
+ body.append("<span id='tests-total'>"+details.total+"</span>");
+});
QUnit.test("Layer alert notification", function(assert) {
var layer = {