@@ -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):
@@ -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"
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/toaster/tests/browser/selenium_helpers_base.py | 1 - lib/toaster/tests/functional/functional_helpers.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)