maestroai / tests /test_entry_points.py
gpamplona's picture
feat: ship interactive reference-to-recipe experience
9eae3b2 verified
Raw
History Blame Contribute Delete
987 Bytes
"""Public pages must lead to the routes the server actually serves."""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1] / "frontend"
ROUTES = ("/reference", "/mixcheck", "/deliverycheck", "/mastercheck")
def test_landing_exposes_every_product_route():
landing = (ROOT / "landing.html").read_text()
for route in ROUTES:
assert f'href="{route}"' in landing
assert 'href="/app' in landing
assert 'id="heroReferenceForm"' in landing
def test_function_pages_share_the_same_route_shelf():
for page in ("reference.html", "mixcheck.html", "deliverycheck.html", "mastercheck.html"):
html = (ROOT / page).read_text()
for route in ROUTES:
assert f'href="{route}"' in html, f"{page}: {route}"
assert 'href="/app' in html
def test_assisted_master_keeps_its_processing_endpoint():
page = (ROOT / "assistedmaster.html").read_text()
assert "Three passes" in page
assert "/api/assisted-master" in page