Files
LIT_e2e_tests/src/tests_wordpress/test_wordpress.py
T
daniel 2e33f8f014 make-all-env-files-available (#4)
Before, a test had only access to it's own env file / configuration (wordpress could see wordpress env file). Now, all env files are available. Wordpress test can also read authentik env file, for example to get the authentik domain.

Reviewed-on: https://git.local-it.org/local-it-infrastructure/e2e_tests/pulls/4
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-11-30 10:53:20 +01:00

14 lines
474 B
Python

from playwright.sync_api import Page, expect
def test_visit_from_authentik(authentik_admin_page: Page):
with authentik_admin_page.expect_popup() as event_context:
authentik_admin_page.get_by_role("link", name="Wordpress").click()
page_wordpress = event_context.value
# look for content wrapper
expect(page_wordpress.locator("#wpcontent")).to_be_visible()
# look for admin bar
expect(page_wordpress.locator("#wpadminbar")).to_be_visible()