bitbake: toaster/tests/functional/helpers: Drop unneeded poll values and sleep

Drop the remaining poll values and the sleep within the main wait function
as the races this was working around now seem to be resolved with the
preceeding patches.

(Bitbake rev: 91e54cbacc57316a4f2ca766afac81e7f3a54718)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-10-18 11:42:51 +01:00
parent d230085ed9
commit 4d9ad3bb8e
2 changed files with 2 additions and 3 deletions

View File

@@ -225,7 +225,6 @@ class SeleniumTestCaseBase(unittest.TestCase):
is_visible = lambda driver: self.find(selector).is_displayed()
msg = 'An element matching "%s" should be visible' % selector
Wait(self.driver, poll=poll).until(is_visible, msg)
time.sleep(poll) # wait for visibility to settle
return self.find(selector)
def wait_until_clickable(self, selector, poll=1):

View File

@@ -167,7 +167,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
self.assertEqual(del_response.status_code, 200)
self.get(reverse('newproject'))
self.wait_until_visible('#new-project-name', poll=3)
self.wait_until_visible('#new-project-name')
self.driver.find_element(By.ID,
"new-project-name").send_keys(project_name)
@@ -187,7 +187,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
self.driver.find_element(By.ID, "create-project-button").click()
element = self.wait_until_visible('#project-created-notification', poll=3)
element = self.wait_until_visible('#project-created-notification')
self.assertTrue(
self.element_exists('#project-created-notification'),
f"Project:{project_name} creation notification not shown"