Adding e2e testing

This commit is contained in:
2026-06-20 10:43:08 -04:00
parent 10ab215396
commit 5e33c1d47b
14 changed files with 506 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
import os
import re
from playwright.sync_api import expect
BASE_URL = os.getenv("E2E_BASE_URL", "http://localhost:8082").rstrip("/")
def app_url(path):
return f"{BASE_URL}/{path.lstrip('/')}"
def test_flight_information_display_loads(page):
page.goto(app_url("/"))
expect(page).to_have_title(re.compile("Swansea Airport - Arrivals & Departures"))
expect(page.get_by_role("heading", name="Flight Information")).to_be_visible()
def test_public_ppr_form_loads(page):
page.goto(app_url("/ppr.html"))
expect(page).to_have_title(re.compile("Swansea PPR"))
expect(page.get_by_role("heading", name=re.compile("PPR Request"))).to_be_visible()
expect(page.get_by_role("button", name="Submit PPR Request")).to_be_visible()