27 lines
755 B
Python
27 lines
755 B
Python
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()
|