rename dotenv_config fixture to env_config
This commit is contained in:
parent
c666e8de4c
commit
14c1a1c1f6
9 changed files with 31 additions and 31 deletions
|
|
@ -1,17 +1,17 @@
|
|||
from pytest_abra.runner import Runner, Test
|
||||
|
||||
|
||||
def condition_always_true(dotenv_config: dict[str, str]) -> bool:
|
||||
def condition_always_true(env_config: dict[str, str]) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def condition_always_false(dotenv_config: dict[str, str]) -> bool:
|
||||
def condition_always_false(env_config: dict[str, str]) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def condition_has_locale(dotenv_config: dict[str, str]) -> bool:
|
||||
if "LOCALE" in dotenv_config:
|
||||
if "de" in dotenv_config["LOCALE"]:
|
||||
def condition_has_locale(env_config: dict[str, str]) -> bool:
|
||||
if "LOCALE" in env_config:
|
||||
if "de" in env_config["LOCALE"]:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ from playwright.sync_api import BrowserContext, Page, expect
|
|||
from pytest_abra.dir_manager import DirManager
|
||||
|
||||
|
||||
def test_visit_from_domain(authentik_admin_context: BrowserContext, dotenv_config: dict[str, str]):
|
||||
def test_visit_from_domain(authentik_admin_context: BrowserContext, env_config: dict[str, str]):
|
||||
"""visit wordpress directly with admin_session, expect not to be logged in"""
|
||||
page = authentik_admin_context.new_page()
|
||||
url = "https://" + dotenv_config["DOMAIN"]
|
||||
url = "https://" + env_config["DOMAIN"]
|
||||
page.goto(url)
|
||||
with pytest.raises(AssertionError):
|
||||
# look for admin bar
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ from playwright.sync_api import BrowserContext, expect
|
|||
from pytest_abra.dir_manager import DirManager
|
||||
|
||||
|
||||
def test_welcome_message(context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager):
|
||||
def test_welcome_message(context: BrowserContext, env_config: dict[str, str], DIR: DirManager):
|
||||
page = context.new_page()
|
||||
url = "https://" + dotenv_config["DOMAIN"]
|
||||
url = "https://" + env_config["DOMAIN"]
|
||||
page.goto(url)
|
||||
|
||||
expect(page.locator(".wp-block-heading")).to_be_visible()
|
||||
if "locale" in dotenv_config and "de" in dotenv_config["locale"]:
|
||||
if "locale" in env_config and "de" in env_config["locale"]:
|
||||
expect(page.get_by_role("heading")).to_have_text("Willkommen bei WordPress!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue