e2e: saml provider: wait for URL

This commit is contained in:
Jens Langhammer 2020-06-29 22:11:50 +02:00
parent 8d31eef47d
commit 05183ed937
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,7 @@ class TestProviderSAML(SeleniumTestCase):
self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER)
self.driver.find_element(By.ID, "id_password").send_keys(USER().username) self.driver.find_element(By.ID, "id_password").send_keys(USER().username)
self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER)
self.wait_for_url("http://localhost:9009/")
self.assertEqual( self.assertEqual(
self.driver.find_element(By.XPATH, "/html/body/pre").text, self.driver.find_element(By.XPATH, "/html/body/pre").text,
f"Hello, {USER().name}!", f"Hello, {USER().name}!",
@ -128,6 +129,7 @@ class TestProviderSAML(SeleniumTestCase):
).text, ).text,
) )
self.driver.find_element(By.CSS_SELECTOR, "[type=submit]").click() self.driver.find_element(By.CSS_SELECTOR, "[type=submit]").click()
self.wait_for_url("http://localhost:9009/")
self.assertEqual( self.assertEqual(
self.driver.find_element(By.XPATH, "/html/body/pre").text, self.driver.find_element(By.XPATH, "/html/body/pre").text,
f"Hello, {USER().name}!", f"Hello, {USER().name}!",
@ -166,6 +168,7 @@ class TestProviderSAML(SeleniumTestCase):
self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_uid_field").send_keys(Keys.ENTER)
self.driver.find_element(By.ID, "id_password").send_keys(USER().username) self.driver.find_element(By.ID, "id_password").send_keys(USER().username)
self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER) self.driver.find_element(By.ID, "id_password").send_keys(Keys.ENTER)
self.wait_for_url("http://localhost:9009/")
self.assertEqual( self.assertEqual(
self.driver.find_element(By.XPATH, "/html/body/pre").text, self.driver.find_element(By.XPATH, "/html/body/pre").text,
f"Hello, {USER().name}!", f"Hello, {USER().name}!",