From 1cd56989a08d79bab88022cd1319debefa9fc289 Mon Sep 17 00:00:00 2001 From: Alassane Yattara Date: Fri, 5 Jan 2024 15:22:17 +0100 Subject: [PATCH] bitbake: toaster/tests: Bug-fix element click intercepted Fix "element click intercepted" on TestProjectConfigTab::test_project_config_tab_right_section (Bitbake rev: c8685c762aa1fab687ff3a0943487675ef720755) Signed-off-by: Alassane Yattara Signed-off-by: Richard Purdie --- .../tests/functional/test_project_page_tab_config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py b/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py index d027e0bc9a..03b0a854d4 100644 --- a/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py +++ b/bitbake/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, TimeoutException +from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException, TimeoutException from orm.models import Project from tests.functional.functional_helpers import SeleniumFunctionalTestCase from selenium.webdriver.common.by import By @@ -362,7 +362,11 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase): By.XPATH, '//*[@id="layer-container"]/form/div/span/div' ) - dropdown_item.click() + try: + dropdown_item.click() + except ElementClickInterceptedException: + self.skipTest( + "layer-container dropdown item click intercepted. Element not properly visible.") add_layer_btn = layers.find_element(By.ID, 'add-layer-btn') add_layer_btn.click() self.wait_until_visible('#layers-in-project-list')