rename test functions to setup_

This commit is contained in:
Daniel 2023-11-30 19:31:46 +01:00
parent c9cb39d375
commit 99e7800792

View file

@ -13,7 +13,7 @@ ADMIN_PASS = os.environ["ADMIN_PASS"]
TESTUSER = {"username": "testuser", "name": "Test User", "password": "test123", "email": "test@example.com"} TESTUSER = {"username": "testuser", "name": "Test User", "password": "test123", "email": "test@example.com"}
def test_create_admin_login(context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager): def setup_admin_state(context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager):
# go to page # go to page
page = context.new_page() page = context.new_page()
url = "https://" + dotenv_config["DOMAIN"] url = "https://" + dotenv_config["DOMAIN"]
@ -99,7 +99,7 @@ def create_user(user_context: BrowserContext, invitelink):
expect(page.locator("ak-library")).to_be_visible() expect(page.locator("ak-library")).to_be_visible()
def test_create_user_session(context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager): def setup_user_state(context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager):
# load admin cookies # load admin cookies
state_file = DIR.STATES / "authentik_admin_state.json" state_file = DIR.STATES / "authentik_admin_state.json"
storage_state = json.loads(state_file.read_bytes()) storage_state = json.loads(state_file.read_bytes())