summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/selenium_helpers.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-07-12 15:54:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-19 08:56:52 +0100
commitdb5426b0794c65f69efe34273fe98823e2a655d7 (patch)
tree5e1714e35a3f292aab922c3e927ebe1a183d0e18 /bitbake/lib/toaster/tests/browser/selenium_helpers.py
parent9475a684c4baa45ba7bdc6ac7a122c122ed17ed9 (diff)
downloadpoky-db5426b0794c65f69efe34273fe98823e2a655d7.tar.gz
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 <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/selenium_helpers.py')
-rw-r--r--bitbake/lib/toaster/tests/browser/selenium_helpers.py7
1 files changed, 7 insertions, 0 deletions
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):
158 """ Find all elements matching CSS selector """ 158 """ Find all elements matching CSS selector """
159 return self.driver.find_elements_by_css_selector(selector) 159 return self.driver.find_elements_by_css_selector(selector)
160 160
161 def element_exists(self, selector):
162 """
163 Return True if one element matching selector exists,
164 False otherwise
165 """
166 return len(self.find_all(selector)) == 1
167
161 def focused_element(self): 168 def focused_element(self):
162 """ Return the element which currently has focus on the page """ 169 """ Return the element which currently has focus on the page """
163 return self.driver.switch_to.active_element 170 return self.driver.switch_to.active_element