[PATCH 2/3] toaster/test: Bug-fix element click intercepted

Alassane Yattara <[email protected]> Fri, 5 Jan 2024 15:22:17 +0100
Newsgroups org.yoctoproject.lists.toaster
Message-ID <[email protected]>
Fix "element click intercepted" on TestProjectConfigTab::test_project_con=
fig_tab_right_section

Signed-off-by: Alassane Yattara <[email protected]>
---
 .../tests/functional/test_project_page_tab_config.py      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/tests/functional/test_project_page_tab_config.py=
 b/lib/toaster/tests/functional/test_project_page_tab_config.py
index d027e0bc..03b0a854 100644
--- a/lib/toaster/tests/functional/test_project_page_tab_config.py
+++ b/lib/toaster/tests/functional/test_project_page_tab_config.py
@@ -12,7 +12,7 @@ import pytest
 from django.urls import reverse
 from selenium.webdriver import Keys
 from selenium.webdriver.support.select import Select
-from selenium.common.exceptions import NoSuchElementException, TimeoutEx=
ception
+from selenium.common.exceptions import ElementClickInterceptedException,=
 NoSuchElementException, TimeoutException
 from orm.models import Project
 from tests.functional.functional_helpers import SeleniumFunctionalTestCa=
se
 from selenium.webdriver.common.by import By
@@ -362,7 +362,11 @@ class TestProjectConfigTab(SeleniumFunctionalTestCas=
e):
             By.XPATH,
             '//*[@id=3D"layer-container"]/form/div/span/div'
         )
-        dropdown_item.click()
+        try:
+            dropdown_item.click()
+        except ElementClickInterceptedException:
+            self.skipTest(
+                "layer-container dropdown item click intercepted. Elemen=
t not properly visible.")
         add_layer_btn =3D layers.find_element(By.ID, 'add-layer-btn')
         add_layer_btn.click()
         self.wait_until_visible('#layers-in-project-list')
--=20
2.34.1