From db5426b0794c65f69efe34273fe98823e2a655d7 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 12 Jul 2016 15:54:56 -0700 Subject: bitbake: toaster-tests: add tests for build artifact display on build dashboard Add tests for display of image, kernel and SDK artifacts on the build dashboard, checking that the "Images" option in the left-hand menu and the "Build artifacts" section display correctly for different types of build. Also add metadata to elements on the build dashboard so it's clearer what they represent, and to assist in finding them in the tests. Add a method to the test helper to make it more convenient to check whether a single element matching a selector exists. [YOCTO #8556] [YOCTO #8563] [YOCTO #9500] (Bitbake rev: 644a888ce5a2141f2e6e1c22430e196b65cb1313) Signed-off-by: Elliot Smith Signed-off-by: bavery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/browser/selenium_helpers.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/toaster/tests/browser/selenium_helpers.py') diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbake/lib/toaster/tests/browser/selenium_helpers.py index 54db2e8cf2..be1f037825 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers.py @@ -158,6 +158,13 @@ class SeleniumTestCase(StaticLiveServerTestCase): """ Find all elements matching CSS selector """ return self.driver.find_elements_by_css_selector(selector) + def element_exists(self, selector): + """ + Return True if one element matching selector exists, + False otherwise + """ + return len(self.find_all(selector)) == 1 + def focused_element(self): """ Return the element which currently has focus on the page """ return self.driver.switch_to.active_element -- cgit v1.2.3-54-g00ecf