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: local-it-infrastructure/e2e_tests#4
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
Daniel 2023-11-30 10:53:20 +01:00 committed by dan
parent 8172f685de
commit 2e33f8f014
5 changed files with 68 additions and 44 deletions

View file

@ -1,14 +1,13 @@
import re
from playwright.sync_api import BrowserContext, expect
from src.dirmanager import DirManager
from playwright.sync_api import Page, expect
def test_visit_from_authentik(admin_context: BrowserContext, dotenv_config: dict[str, str], DIR: DirManager):
page_authentik = admin_context.new_page()
with page_authentik.expect_popup() as event_context:
page_authentik.get_by_role("link", name="Wordpress").click()
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()