* turn repo into installable package (pip install -e .) * add hatchling build packend * call it pytest-abra * add pytest entrypoint, so that it gets loaded automatically if installed (and pytest is run) * make fixtures optional, so that pytest can still be used in other context * add cli script -> you can now directly run "pytest-abra" in console Reviewed-on: local-it-infrastructure/e2e_tests#9 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
14 lines
649 B
Python
14 lines
649 B
Python
from playwright.sync_api import BrowserContext, expect
|
|
|
|
from pytest_abra.dir_manager import DirManager
|
|
|
|
|
|
def test_wordpress(admin_session: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager):
|
|
page_authentik = admin_session.new_page()
|
|
with page_authentik.expect_popup() as event_context:
|
|
page_authentik.get_by_role("link", name="Wordpress").click()
|
|
page_wordpress = event_context.value
|
|
|
|
expect(page_wordpress.locator("#wpcontent")).to_be_visible()
|
|
if "locale" in dotenv_config and "de" in dotenv_config["locale"]:
|
|
expect(page_wordpress.get_by_role("heading")).to_have_text("Willkommen bei WordPress!")
|