diff options
author | Alassane Yattara <alassane.yattara@savoirfairelinux.com> | 2023-12-05 17:40:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 22:28:03 +0000 |
commit | 829953631ba73684523adf9305b411cc312bf2ad (patch) | |
tree | 89becea7e9d348933a863a21458df3c33feb498a /bitbake | |
parent | 8efe835e3bbad07d322755feaf40271a89938cd6 (diff) | |
download | poky-829953631ba73684523adf9305b411cc312bf2ad.tar.gz |
bitbake: toaster/test: delay driver action until elements to appear
Update tests/browser/(test_landing_page.py and test_layerdetails_page.py)
to delay driver actions until for elements to appear
(Bitbake rev: 72908138bd2735c69f5e418ec5f0f2cf8215050a)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/tests/browser/test_landing_page.py | 1 | ||||
-rw-r--r-- | bitbake/lib/toaster/tests/browser/test_layerdetails_page.py | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_landing_page.py b/bitbake/lib/toaster/tests/browser/test_landing_page.py index 7ec52a4b40..ca0b2e631a 100644 --- a/bitbake/lib/toaster/tests/browser/test_landing_page.py +++ b/bitbake/lib/toaster/tests/browser/test_landing_page.py | |||
@@ -206,6 +206,7 @@ class TestLandingPage(SeleniumTestCase): | |||
206 | 206 | ||
207 | self.get(reverse('landing')) | 207 | self.get(reverse('landing')) |
208 | 208 | ||
209 | self.wait_until_visible("#latest-builds") | ||
209 | elements = self.find_all('#allbuildstable') | 210 | elements = self.find_all('#allbuildstable') |
210 | self.assertEqual(len(elements), 1, 'should redirect to builds') | 211 | self.assertEqual(len(elements), 1, 'should redirect to builds') |
211 | content = self.get_page_source() | 212 | content = self.get_page_source() |
diff --git a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py index cb7b915bf0..27cda0f2e7 100644 --- a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py +++ b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py | |||
@@ -68,6 +68,7 @@ class TestLayerDetailsPage(SeleniumTestCase): | |||
68 | check that the new values exist""" | 68 | check that the new values exist""" |
69 | 69 | ||
70 | self.get(self.url) | 70 | self.get(self.url) |
71 | self.wait_until_visible("#add-remove-layer-btn") | ||
71 | 72 | ||
72 | self.click("#add-remove-layer-btn") | 73 | self.click("#add-remove-layer-btn") |
73 | self.click("#edit-layer-source") | 74 | self.click("#edit-layer-source") |
@@ -105,7 +106,9 @@ class TestLayerDetailsPage(SeleniumTestCase): | |||
105 | for save_btn in self.find_all(".change-btn"): | 106 | for save_btn in self.find_all(".change-btn"): |
106 | save_btn.click() | 107 | save_btn.click() |
107 | 108 | ||
108 | self.click("#save-changes-for-switch") | 109 | self.wait_until_visible("#save-changes-for-switch") |
110 | btn_save_chg_for_switch = self.find("#save-changes-for-switch") | ||
111 | btn_save_chg_for_switch.click() | ||
109 | self.wait_until_visible("#edit-layer-source") | 112 | self.wait_until_visible("#edit-layer-source") |
110 | 113 | ||
111 | # Refresh the page to see if the new values are returned | 114 | # Refresh the page to see if the new values are returned |
@@ -134,7 +137,9 @@ class TestLayerDetailsPage(SeleniumTestCase): | |||
134 | new_dir = "/home/test/my-meta-dir" | 137 | new_dir = "/home/test/my-meta-dir" |
135 | dir_input.send_keys(new_dir) | 138 | dir_input.send_keys(new_dir) |
136 | 139 | ||
137 | self.click("#save-changes-for-switch") | 140 | self.wait_until_visible("#save-changes-for-switch") |
141 | btn_save_chg_for_switch = self.find("#save-changes-for-switch") | ||
142 | btn_save_chg_for_switch.click() | ||
138 | self.wait_until_visible("#edit-layer-source") | 143 | self.wait_until_visible("#edit-layer-source") |
139 | 144 | ||
140 | # Refresh the page to see if the new values are returned | 145 | # Refresh the page to see if the new values are returned |