tests/e2e: fix more test, add requirements for crypto

This commit is contained in:
Jens Langhammer
2021-02-27 23:33:15 +01:00
parent 088e0e736a
commit 3c8a0081bc
6 changed files with 97 additions and 26 deletions

View File

@ -149,12 +149,23 @@ class TestProviderSAML(SeleniumTestCase):
self.container = self.setup_client(provider)
self.driver.get("http://localhost:9009")
self.login()
self.assertEqual(
app.name,
self.driver.find_element(By.ID, "application-name").text,
self.wait.until(
ec.presence_of_element_located((By.CSS_SELECTOR, "ak-flow-executor"))
)
sleep(1)
self.driver.find_element(By.CSS_SELECTOR, "[type=submit]").click()
flow_executor = self.get_shadow_root("ak-flow-executor")
consent_stage = self.get_shadow_root("ak-stage-consent", flow_executor)
self.assertIn(
app.name,
consent_stage.find_element(By.CSS_SELECTOR, "#header-text").text,
)
consent_stage.find_element(
By.CSS_SELECTOR,
("[type=submit]"),
).click()
self.wait_for_url("http://localhost:9009/")
body = loads(self.driver.find_element(By.CSS_SELECTOR, "pre").text)