diff mbox series

[09/28] toaster/tests/functional/helpers: Drop unneeded poll values and sleep

Message ID 20241023095949.3351980-9-richard.purdie@linuxfoundation.org
State New
Headers show
Series [01/28] toaster/test/functional: Move _create_test_new_project to base class as helper | expand

Commit Message

Richard Purdie Oct. 23, 2024, 9:59 a.m. UTC
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(-)
diff mbox series

Patch

diff --git a/lib/toaster/tests/browser/selenium_helpers_base.py b/lib/toaster/tests/browser/selenium_helpers_base.py
index b060133b1d..5a4a4ef8b4 100644
--- a/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -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):
diff --git a/lib/toaster/tests/functional/functional_helpers.py b/lib/toaster/tests/functional/functional_helpers.py
index cc508e98d9..a7a3459630 100644
--- a/lib/toaster/tests/functional/functional_helpers.py
+++ b/lib/toaster/tests/functional/functional_helpers.py
@@ -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"