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>
This commit is contained in:
Alassane Yattara 2024-01-09 17:30:34 +01:00 committed by Richard Purdie
parent 0dcf84f830
commit 36dc42bde7
4 changed files with 9 additions and 6 deletions

View File

@ -452,9 +452,10 @@ class TestAllBuildsPage(SeleniumTestCase):
def test_show_rows(row_to_show, show_row_link):
# Check that we can show rows == row_to_show
show_row_link.select_by_value(str(row_to_show))
self.wait_until_visible('#allbuildstable tbody tr', poll=2)
self.wait_until_visible('#allbuildstable tbody tr', poll=3)
# check at least some rows are visible
self.assertTrue(
len(self.find_all('#allbuildstable tbody tr')) == row_to_show
len(self.find_all('#allbuildstable tbody tr')) > 0
)
url = reverse('all-builds')

View File

@ -314,8 +314,9 @@ class TestAllProjectsPage(SeleniumTestCase):
# Check that we can show rows == row_to_show
show_row_link.select_by_value(str(row_to_show))
self.wait_until_visible('#projectstable tbody tr', poll=3)
# check at least some rows are visible
self.assertTrue(
len(self.find_all('#projectstable tbody tr')) == row_to_show
len(self.find_all('#projectstable tbody tr')) > 0
)
url = reverse('all-projects')

View File

@ -192,9 +192,10 @@ class TestProjectPage(SeleniumFunctionalTestCase):
def test_show_rows(row_to_show, show_row_link):
# Check that we can show rows == row_to_show
show_row_link.select_by_value(str(row_to_show))
self.wait_until_visible(f'#{table_selector} tbody tr', poll=2)
self.wait_until_visible(f'#{table_selector} tbody tr', poll=3)
# check at least some rows are visible
self.assertTrue(
len(self.find_all(f'#{table_selector} tbody tr')) == row_to_show
len(self.find_all(f'#{table_selector} tbody tr')) > 0
)
self.wait_until_present(f'#{table_selector} tbody tr')
show_rows = self.driver.find_elements(

View File

@ -253,7 +253,7 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase):
def test_show_rows(row_to_show, show_row_link):
# Check that we can show rows == row_to_show
show_row_link.select_by_value(str(row_to_show))
self.wait_until_visible('#imagerecipestable tbody tr')
self.wait_until_visible('#imagerecipestable tbody tr', poll=3)
# check at least some rows are visible
self.assertTrue(
len(self.find_all('#imagerecipestable tbody tr')) > 0