bitbake: toaster/tests/functional: Fix test race on alert

THe test fails on faster systems as we need to wait. Fix that and
a typo.

(Bitbake rev: 749b561196b0b1b388051b345fee2efb6ce68ff7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-10-09 17:43:15 +01:00
parent 7622becfef
commit 3dc0aaa397

View File

@@ -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")