mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
selenium: update next_url after waiting for it to change
This commit is contained in:
@@ -88,9 +88,8 @@ def clear(browser, by_locator):
|
||||
# LOGIN PAGE
|
||||
async def test_elements_of_login_page(app, browser):
|
||||
await open_url(app, browser)
|
||||
logo = is_displayed(browser, LoginPageLocators.LOGO)
|
||||
assert is_displayed(browser, LoginPageLocators.LOGO)
|
||||
logo_text = browser.find_element(*LoginPageLocators.LOGO).get_attribute("innerHTML")
|
||||
assert logo == True
|
||||
|
||||
|
||||
async def login(browser, user, pass_w):
|
||||
@@ -186,10 +185,11 @@ async def test_open_url_login(
|
||||
assert next_url.endswith("spawn?param=value")
|
||||
assert f"user/{user}/" not in next_url
|
||||
else:
|
||||
if next_url.endswith(f"/user/{user}/") == False:
|
||||
if not next_url.endswith(f"/user/{user}/"):
|
||||
await webdriver_wait(
|
||||
browser, EC.url_to_be(ujoin(public_url(app), f"/user/{user}/"))
|
||||
)
|
||||
next_url = browser.current_url
|
||||
assert next_url.endswith(f"/user/{user}/")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user