2020-05-28 22:45:56 +00:00
|
|
|
"""test default login flow"""
|
2020-09-11 21:21:11 +00:00
|
|
|
from sys import platform
|
|
|
|
from unittest.case import skipUnless
|
|
|
|
|
2021-02-27 21:32:48 +00:00
|
|
|
from tests.e2e.utils import USER, SeleniumTestCase, apply_migration, retry
|
2020-05-28 22:45:56 +00:00
|
|
|
|
|
|
|
|
2020-09-11 21:21:11 +00:00
|
|
|
@skipUnless(platform.startswith("linux"), "requires local docker")
|
2020-06-29 19:39:04 +00:00
|
|
|
class TestFlowsLogin(SeleniumTestCase):
|
2020-05-28 22:45:56 +00:00
|
|
|
"""test default login flow"""
|
|
|
|
|
2020-10-20 16:42:26 +00:00
|
|
|
@retry()
|
2021-02-27 21:32:48 +00:00
|
|
|
@apply_migration("authentik_core", "0003_default_user")
|
|
|
|
@apply_migration("authentik_flows", "0008_default_flows")
|
2021-05-25 07:48:45 +00:00
|
|
|
@apply_migration("authentik_flows", "0011_flow_title")
|
2020-05-28 22:45:56 +00:00
|
|
|
def test_login(self):
|
|
|
|
"""test default login flow"""
|
2021-03-22 12:44:17 +00:00
|
|
|
self.driver.get(
|
|
|
|
self.url(
|
|
|
|
"authentik_core:if-flow",
|
|
|
|
flow_slug="default-authentication-flow",
|
|
|
|
)
|
|
|
|
)
|
2021-02-27 17:48:41 +00:00
|
|
|
self.login()
|
2021-03-22 12:44:17 +00:00
|
|
|
self.wait_for_url(self.if_admin_url("/library"))
|
2020-11-23 13:24:42 +00:00
|
|
|
self.assert_user(USER())
|