[gnome-continuous-yocto/gnomeostree-3.28-rocko: 879/8267] bitbake: toaster: testsjs Add call back to append elements on completion of tests



commit abfd095a05f70e1f2a80c6491d2a5d19593d4824
Author: Michael Wood <michael g wood intel com>
Date:   Mon Apr 4 11:49:37 2016 +0100

    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>

 .../lib/toaster/toastergui/static/js/tests/test.js |    7 +++++++
 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 aac0ba6..2b62118 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 = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]