summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2024-01-09 17:30:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-10 13:55:33 +0000
commit36dc42bde7d9df305a8ffcef3c6118afd66410af (patch)
tree99549b6bb53f8585de333a7e5e4f6d7e6a57b19d /bitbake/lib
parent0dcf84f830314e52d97314ffd56ef576d3f924fd (diff)
downloadpoky-36dc42bde7d9df305a8ffcef3c6118afd66410af.tar.gz
bitbake: toaster/tests: Bug-fix ToasterTable show_rows testcases
Test if some rows are visible in table instead of compare row to row_to_show, because sometime full avaiblable content did not display Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/147/steps/12/logs/stdio (Bitbake rev: 5b0a48265aafa62259c575707c3afa6dd56f8008) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/tests/browser/test_all_builds_page.py5
-rw-r--r--bitbake/lib/toaster/tests/browser/test_all_projects_page.py3
-rw-r--r--bitbake/lib/toaster/tests/functional/test_project_page.py5
-rw-r--r--bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py2
4 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_all_builds_page.py b/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
index ab6da821ba..b9356a0344 100644
--- a/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
@@ -452,9 +452,10 @@ class TestAllBuildsPage(SeleniumTestCase):
452 def test_show_rows(row_to_show, show_row_link): 452 def test_show_rows(row_to_show, show_row_link):
453 # Check that we can show rows == row_to_show 453 # Check that we can show rows == row_to_show
454 show_row_link.select_by_value(str(row_to_show)) 454 show_row_link.select_by_value(str(row_to_show))
455 self.wait_until_visible('#allbuildstable tbody tr', poll=2) 455 self.wait_until_visible('#allbuildstable tbody tr', poll=3)
456 # check at least some rows are visible
456 self.assertTrue( 457 self.assertTrue(
457 len(self.find_all('#allbuildstable tbody tr')) == row_to_show 458 len(self.find_all('#allbuildstable tbody tr')) > 0
458 ) 459 )
459 460
460 url = reverse('all-builds') 461 url = reverse('all-builds')
diff --git a/bitbake/lib/toaster/tests/browser/test_all_projects_page.py b/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
index 6540dfa99c..9ed1901cc9 100644
--- a/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
@@ -314,8 +314,9 @@ class TestAllProjectsPage(SeleniumTestCase):
314 # Check that we can show rows == row_to_show 314 # Check that we can show rows == row_to_show
315 show_row_link.select_by_value(str(row_to_show)) 315 show_row_link.select_by_value(str(row_to_show))
316 self.wait_until_visible('#projectstable tbody tr', poll=3) 316 self.wait_until_visible('#projectstable tbody tr', poll=3)
317 # check at least some rows are visible
317 self.assertTrue( 318 self.assertTrue(
318 len(self.find_all('#projectstable tbody tr')) == row_to_show 319 len(self.find_all('#projectstable tbody tr')) > 0
319 ) 320 )
320 321
321 url = reverse('all-projects') 322 url = reverse('all-projects')
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page.py b/bitbake/lib/toaster/tests/functional/test_project_page.py
index 31177cc1ff..adbe3587e4 100644
--- a/bitbake/lib/toaster/tests/functional/test_project_page.py
+++ b/bitbake/lib/toaster/tests/functional/test_project_page.py
@@ -192,9 +192,10 @@ class TestProjectPage(SeleniumFunctionalTestCase):
192 def test_show_rows(row_to_show, show_row_link): 192 def test_show_rows(row_to_show, show_row_link):
193 # Check that we can show rows == row_to_show 193 # Check that we can show rows == row_to_show
194 show_row_link.select_by_value(str(row_to_show)) 194 show_row_link.select_by_value(str(row_to_show))
195 self.wait_until_visible(f'#{table_selector} tbody tr', poll=2) 195 self.wait_until_visible(f'#{table_selector} tbody tr', poll=3)
196 # check at least some rows are visible
196 self.assertTrue( 197 self.assertTrue(
197 len(self.find_all(f'#{table_selector} tbody tr')) == row_to_show 198 len(self.find_all(f'#{table_selector} tbody tr')) > 0
198 ) 199 )
199 self.wait_until_present(f'#{table_selector} tbody tr') 200 self.wait_until_present(f'#{table_selector} tbody tr')
200 show_rows = self.driver.find_elements( 201 show_rows = self.driver.find_elements(
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 03b0a854d4..eb905ddf3f 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
@@ -253,7 +253,7 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase):
253 def test_show_rows(row_to_show, show_row_link): 253 def test_show_rows(row_to_show, show_row_link):
254 # Check that we can show rows == row_to_show 254 # Check that we can show rows == row_to_show
255 show_row_link.select_by_value(str(row_to_show)) 255 show_row_link.select_by_value(str(row_to_show))
256 self.wait_until_visible('#imagerecipestable tbody tr') 256 self.wait_until_visible('#imagerecipestable tbody tr', poll=3)
257 # check at least some rows are visible 257 # check at least some rows are visible
258 self.assertTrue( 258 self.assertTrue(
259 len(self.find_all('#imagerecipestable tbody tr')) > 0 259 len(self.find_all('#imagerecipestable tbody tr')) > 0