tests/e2e: fix SAML source tests

This commit is contained in:
Jens Langhammer
2021-02-28 00:30:33 +01:00
parent 2ad4bd5c0a
commit ee6b365003
2 changed files with 49 additions and 19 deletions

View File

@ -148,19 +148,15 @@ class TestSourceOAuth2(SeleniumTestCase):
# At this point we've been redirected back
# and we're asked for the username
flow_executor = self.get_shadow_root("ak-flow-executor")
prompt_stage = self.get_shadow_root(
"ak-stage-prompt", flow_executor
)
prompt_stage = self.get_shadow_root("ak-stage-prompt", flow_executor)
prompt_stage.find_element(
By.CSS_SELECTOR, "input[name=username]"
).click()
prompt_stage.find_element(
By.CSS_SELECTOR, "input[name=username]"
).send_keys("foo")
prompt_stage.find_element(
By.CSS_SELECTOR, "input[name=username]"
).send_keys(Keys.ENTER)
prompt_stage.find_element(By.CSS_SELECTOR, "input[name=username]").click()
prompt_stage.find_element(By.CSS_SELECTOR, "input[name=username]").send_keys(
"foo"
)
prompt_stage.find_element(By.CSS_SELECTOR, "input[name=username]").send_keys(
Keys.ENTER
)
# Wait until we've logged in
self.wait_for_url(self.shell_url("/library"))