diff mbox series

[3/3] toaster/tests/functional: Fix test race on alert

Message ID 20241009172508.447620-3-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 749b561196b0b1b388051b345fee2efb6ce68ff7
Headers show
Series [1/3] toaster/tests/functional: Fix later details page test issues | expand

Commit Message

Richard Purdie Oct. 9, 2024, 5:25 p.m. UTC
THe test fails on faster systems as we need to wait. Fix that and
a typo.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/toaster/tests/functional/test_create_new_project.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/toaster/tests/functional/test_create_new_project.py b/lib/toaster/tests/functional/test_create_new_project.py
index c3b5679514..f7d17847ae 100644
--- a/lib/toaster/tests/functional/test_create_new_project.py
+++ b/lib/toaster/tests/functional/test_create_new_project.py
@@ -172,8 +172,10 @@  class TestCreateNewProject(SeleniumFunctionalTestCase):
                                  "import-project-dir").send_keys(wrong_path)
         self.driver.find_element(By.ID, "create-project-button").click()
 
+        self.wait_until_visible('.alert-danger')
+
         # check error message
         self.assertTrue(self.element_exists('.alert-danger'),
-                        'Allert message not shown')
+                        'Alert message not shown')
         self.assertTrue(wrong_path in self.find('.alert-danger').text,
                         "Wrong path not in alert message")