[oe-commits] [bitbake] 01/44: toaster: testsjs Add call back to append elements on completion of tests

git at git.openembedded.org git at git.openembedded.org
Mon Jun 13 21:10:49 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 81798ab046b0717614e28e0a339172f3803e451b
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Mon Apr 4 11:49:37 2016 +0100

    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 <michael.g.wood at intel.com>
    Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/toaster/toastergui/static/js/tests/test.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/toaster/toastergui/static/js/tests/test.js b/lib/toaster/toastergui/static/js/tests/test.js
index aac0ba6..2b62118 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("<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 = {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list