* [PATCH 2/3] toaster/test: Bug-fix element click intercepted
2024-01-05 14:22 [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows Alassane Yattara
@ 2024-01-05 14:22 ` Alassane Yattara
2024-01-05 14:22 ` [PATCH 3/3] toaster/test: Delay driver first action on create new project page Alassane Yattara
2024-01-08 13:32 ` [Toaster] [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Alassane Yattara @ 2024-01-05 14:22 UTC (permalink / raw)
To: toaster; +Cc: Alassane Yattara
Fix "element click intercepted" on TestProjectConfigTab::test_project_config_tab_right_section
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
.../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, 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')
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] toaster/test: Delay driver first action on create new project page
2024-01-05 14:22 [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows Alassane Yattara
2024-01-05 14:22 ` [PATCH 2/3] toaster/test: Bug-fix element click intercepted Alassane Yattara
@ 2024-01-05 14:22 ` Alassane Yattara
2024-01-08 13:32 ` [Toaster] [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Alassane Yattara @ 2024-01-05 14:22 UTC (permalink / raw)
To: toaster; +Cc: Alassane Yattara
Wait for element visible on create new project page
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
lib/toaster/tests/browser/test_new_project_page.py | 1 +
lib/toaster/tests/functional/test_create_new_project.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/tests/browser/test_new_project_page.py b/lib/toaster/tests/browser/test_new_project_page.py
index 0c33c44f..70b55f3c 100644
--- a/lib/toaster/tests/browser/test_new_project_page.py
+++ b/lib/toaster/tests/browser/test_new_project_page.py
@@ -47,6 +47,7 @@ class TestNewProjectPage(SeleniumTestCase):
url = reverse('newproject')
self.get(url)
+ self.wait_until_visible('#new-project-name', poll=3)
self.enter_text('#new-project-name', project_name)
select = Select(self.find('#projectversion'))
diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py
index 9f880107..94d90459 100644
--- a/lib/toaster/tests/functional/test_create_new_project.py
+++ b/lib/toaster/tests/functional/test_create_new_project.py
@@ -32,6 +32,7 @@ class TestCreateNewProject(SeleniumFunctionalTestCase):
- Merge Toaster settings: True or False
"""
self.get(reverse('newproject'))
+ self.wait_until_visible('#new-project-name', poll=3)
self.driver.find_element(By.ID,
"new-project-name").send_keys(project_name)
@@ -111,7 +112,7 @@ class TestCreateNewProject(SeleniumFunctionalTestCase):
"""
release = '5'
release_title = 'Yocto Project 3.1 "Dunfell"'
- project_name = 'projectdunfull'
+ project_name = 'projectdunfell'
self._create_test_new_project(
project_name,
release,
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Toaster] [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows
2024-01-05 14:22 [PATCH 1/3] toaster/test: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows Alassane Yattara
2024-01-05 14:22 ` [PATCH 2/3] toaster/test: Bug-fix element click intercepted Alassane Yattara
2024-01-05 14:22 ` [PATCH 3/3] toaster/test: Delay driver first action on create new project page Alassane Yattara
@ 2024-01-08 13:32 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2024-01-08 13:32 UTC (permalink / raw)
To: Alassane Yattara, toaster; +Cc: bitbake-devel
Hi Alassane,
On Fri, 2024-01-05 at 15:22 +0100, Alassane Yattara wrote:
> Check some rows are visible in table instead of compare table row to
> row_to_show, because recipe image table sometime doesn't display full avaiblable
> images
>
> Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
> ---
> lib/toaster/tests/functional/test_project_page_tab_config.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks, I've merged this series and run more tests. It is definitely
improving, in the run of seven there was one failed build (4 tests):
https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/132/steps/11/logs/stdio
FAILED ../bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py::TestNewCustomImagePage::test_new_duplicates_non_image_recipe
FAILED ../bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py::TestNewCustomImagePage::test_new_duplicates_other_project_image
FAILED ../bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py::TestNewCustomImagePage::test_new_duplicates_project_image
FAILED ../bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py::TestNewCustomImagePage::test_new_image
and in a separate batch of 5 runs, there was also one failed build:
https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/124
FAILED ../bitbake/lib/toaster/tests/browser/test_builddashboard_page.py::TestBuildDashboardPage::test_criticals_show_as_errors
which is much better than the previous failure rates.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread