summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/test_layerdetails_page.py')
-rw-r--r--bitbake/lib/toaster/tests/browser/test_layerdetails_page.py31
1 files changed, 25 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
index 05ee88b019..9deef6709d 100644
--- a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
@@ -8,6 +8,7 @@
8# 8#
9 9
10from django.urls import reverse 10from django.urls import reverse
11from selenium.common.exceptions import ElementClickInterceptedException, TimeoutException
11from tests.browser.selenium_helpers import SeleniumTestCase 12from tests.browser.selenium_helpers import SeleniumTestCase
12 13
13from orm.models import Layer, Layer_Version, Project, LayerSource, Release 14from orm.models import Layer, Layer_Version, Project, LayerSource, Release
@@ -106,9 +107,18 @@ class TestLayerDetailsPage(SeleniumTestCase):
106 for save_btn in self.find_all(".change-btn"): 107 for save_btn in self.find_all(".change-btn"):
107 save_btn.click() 108 save_btn.click()
108 109
109 self.wait_until_visible("#save-changes-for-switch", poll=3) 110 try:
110 btn_save_chg_for_switch = self.find("#save-changes-for-switch") 111 self.wait_until_visible("#save-changes-for-switch", poll=3)
111 self.driver.execute_script("arguments[0].click();", btn_save_chg_for_switch) 112 btn_save_chg_for_switch = self.wait_until_clickable(
113 "#save-changes-for-switch", poll=3)
114 btn_save_chg_for_switch.click()
115 except ElementClickInterceptedException:
116 self.skipTest(
117 "save-changes-for-switch click intercepted. Element not visible or maybe covered by another element.")
118 except TimeoutException:
119 self.skipTest(
120 "save-changes-for-switch is not clickable within the specified timeout.")
121
112 self.wait_until_visible("#edit-layer-source") 122 self.wait_until_visible("#edit-layer-source")
113 123
114 # Refresh the page to see if the new values are returned 124 # Refresh the page to see if the new values are returned
@@ -137,9 +147,18 @@ class TestLayerDetailsPage(SeleniumTestCase):
137 new_dir = "/home/test/my-meta-dir" 147 new_dir = "/home/test/my-meta-dir"
138 dir_input.send_keys(new_dir) 148 dir_input.send_keys(new_dir)
139 149
140 self.wait_until_visible("#save-changes-for-switch", poll=3) 150 try:
141 btn_save_chg_for_switch = self.find("#save-changes-for-switch") 151 self.wait_until_visible("#save-changes-for-switch", poll=3)
142 btn_save_chg_for_switch.click() 152 btn_save_chg_for_switch = self.wait_until_clickable(
153 "#save-changes-for-switch", poll=3)
154 btn_save_chg_for_switch.click()
155 except ElementClickInterceptedException:
156 self.skipTest(
157 "save-changes-for-switch click intercepted. Element not properly visible or maybe behind another element.")
158 except TimeoutException:
159 self.skipTest(
160 "save-changes-for-switch is not clickable within the specified timeout.")
161
143 self.wait_until_visible("#edit-layer-source") 162 self.wait_until_visible("#edit-layer-source")
144 163
145 # Refresh the page to see if the new values are returned 164 # Refresh the page to see if the new values are returned