summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/tests/browser/README7
-rw-r--r--bitbake/lib/toaster/tests/browser/test_js_unit_tests.py8
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/tests/test.js8
3 files changed, 8 insertions, 15 deletions
diff --git a/bitbake/lib/toaster/tests/browser/README b/bitbake/lib/toaster/tests/browser/README
index 63e8169c16..f57154eda9 100644
--- a/bitbake/lib/toaster/tests/browser/README
+++ b/bitbake/lib/toaster/tests/browser/README
@@ -4,10 +4,11 @@ These tests require Selenium to be installed in your Python environment.
4 4
5The simplest way to install this is via pip: 5The simplest way to install this is via pip:
6 6
7 pip install selenium 7 pip install selenium==2.53.2
8 8
9Alternatively, if you used pip to install the libraries required by Toaster, 9Note that if you use other versions of Selenium, some of the tests (such as
10selenium will already be installed. 10tests.browser.test_js_unit_tests.TestJsUnitTests) may fail, as these rely on
11a Selenium test report with a version-specific format.
11 12
12To run tests against Chrome: 13To run tests against Chrome:
13 14
diff --git a/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py b/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
index e63da8e7a5..3c0b96252f 100644
--- a/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
+++ b/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
@@ -38,11 +38,11 @@ class TestJsUnitTests(SeleniumTestCase):
38 def test_that_js_unit_tests_pass(self): 38 def test_that_js_unit_tests_pass(self):
39 url = reverse('js-unit-tests') 39 url = reverse('js-unit-tests')
40 self.get(url) 40 self.get(url)
41 self.wait_until_present('#tests-failed') 41 self.wait_until_present('#qunit-testresult .failed')
42 42
43 failed = self.find("#tests-failed").text 43 failed = self.find("#qunit-testresult .failed").text
44 passed = self.find("#tests-passed").text 44 passed = self.find("#qunit-testresult .passed").text
45 total = self.find("#tests-total").text 45 total = self.find("#qunit-testresult .total").text
46 46
47 logger.info("Js unit tests completed %s out of %s passed, %s failed", 47 logger.info("Js unit tests completed %s out of %s passed, %s failed",
48 passed, 48 passed,
diff --git a/bitbake/lib/toaster/toastergui/static/js/tests/test.js b/bitbake/lib/toaster/toastergui/static/js/tests/test.js
index 2b62118d01..44b752277c 100644
--- a/bitbake/lib/toaster/toastergui/static/js/tests/test.js
+++ b/bitbake/lib/toaster/toastergui/static/js/tests/test.js
@@ -2,14 +2,6 @@
2/* Unit tests for Toaster's JS */ 2/* Unit tests for Toaster's JS */
3 3
4/* libtoaster tests */ 4/* libtoaster tests */
5QUnit.done(function(details){
6 /* Selenium test will look for these elements to get the results */
7 var body = $('body');
8 body.append("<span id='tests-failed'>"+details.failed+"</span>");
9 body.append("<span id='tests-passed'>"+details.passed+"</span>");
10 body.append("<span id='tests-total'>"+details.total+"</span>");
11});
12
13QUnit.test("Layer alert notification", function(assert) { 5QUnit.test("Layer alert notification", function(assert) {
14 var layer = { 6 var layer = {
15 "layerdetailurl":"/toastergui/project/1/layer/22", 7 "layerdetailurl":"/toastergui/project/1/layer/22",