This is an automated email from the ASF dual-hosted git repository. sbp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 6a5528686a6d3db335149603396935639aff608d Author: Sean B. Palmer <[email protected]> AuthorDate: Sun Dec 7 13:20:15 2025 +0000 Add an initial test for an authenticated route --- tests/e2e/helpers.py | 5 +++++ tests/e2e/root/conftest.py | 7 +++++++ tests/e2e/root/test_get.py | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/tests/e2e/helpers.py b/tests/e2e/helpers.py index 0875765..fb891bd 100644 --- a/tests/e2e/helpers.py +++ b/tests/e2e/helpers.py @@ -23,6 +23,11 @@ from playwright.sync_api import Page _ATR_BASE_URL: Final[str] = os.environ.get("ATR_BASE_URL", "https://localhost.apache.org:8080") +def log_in(page: Page) -> None: + page.goto(f"{_ATR_BASE_URL}/test/login") + page.wait_for_load_state() + + def visit(page: Page, path: str) -> None: page.goto(f"{_ATR_BASE_URL}{path}") page.wait_for_load_state() diff --git a/tests/e2e/root/conftest.py b/tests/e2e/root/conftest.py index 681de67..fc2558d 100644 --- a/tests/e2e/root/conftest.py +++ b/tests/e2e/root/conftest.py @@ -38,3 +38,10 @@ def page_index(page: Page) -> Generator[Page]: def page_policies(page: Page) -> Generator[Page]: helpers.visit(page, "/policies") yield page + + [email protected] +def page_about(page: Page) -> Generator[Page]: + helpers.log_in(page) + helpers.visit(page, "/about") + yield page diff --git a/tests/e2e/root/test_get.py b/tests/e2e/root/test_get.py index d7d83d8..01311fa 100644 --- a/tests/e2e/root/test_get.py +++ b/tests/e2e/root/test_get.py @@ -34,3 +34,7 @@ def test_policies_has_heading(page_policies: Page) -> None: def test_policies_loads(page_policies: Page) -> None: expect(page_policies).to_have_title("Policies ~ ATR") + + +def test_about_loads(page_about: Page) -> None: + expect(page_about).to_have_title("About ATR ~ ATR") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
