diff mbox series

[v2,5/6] toaster/test: Handle case when SSTATE_DIR and DL_DIR not visible in the page project/BitBake variables

Message ID 20231214221157.604253-5-alassane.yattara@savoirfairelinux.com
State New
Headers show
Series [v2,1/6] toaster/test: bug-fix element click intercepted in browser/test_layerdetails_page.py | expand

Commit Message

Alassane Yattara Dec. 14, 2023, 10:11 p.m. UTC
Skip continu runing testcase if SSTATE_DIR or DL_DIR no set in page
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/tests/functional/test_project_config.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/lib/toaster/tests/functional/test_project_config.py b/lib/toaster/tests/functional/test_project_config.py
index 2d162d81..c70936e1 100644
--- a/lib/toaster/tests/functional/test_project_config.py
+++ b/lib/toaster/tests/functional/test_project_config.py
@@ -162,8 +162,9 @@  class TestProjectConfig(SeleniumFunctionalTestCase):
         try:
             change_dl_dir_btn = self.wait_until_visible('#change-dl_dir-icon', poll=2)
         except TimeoutException:
-            # If download dir is not displayed, test is skipped
-            return True
+            # skip test if becase variable DL_DIR is not set/visible in page
+            self.skipTest('DL_DIR is not set/visible in the page project/BitBake variables')
+
         change_dl_dir_btn = self.wait_until_visible('#change-dl_dir-icon', poll=2)
         change_dl_dir_btn.click()
 
@@ -220,8 +221,8 @@  class TestProjectConfig(SeleniumFunctionalTestCase):
             self.wait_until_visible('#change-sstate_dir-icon', poll=2)
             self.click('#change-sstate_dir-icon')
         except TimeoutException:
-            # If sstate_dir is not displayed, test is skipped
-            return True
+            # skip test if becase variable SSTATE_DIR is not set/visible in page
+            self.skipTest('SSTATE_DIR is not set/visible in the page project/BitBake variables')
 
         # path doesn't start with / or ${...}
         input_field = self.wait_until_visible('#new-sstate_dir', poll=2)