Initial commit: Canteen Asset Geolocation Tool v2

This commit is contained in:
2026-05-17 18:55:28 -04:00
commit 7da3f28c6a
50 changed files with 19509 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
"""Smoke tests — verify the page loads and basic elements exist."""
import pytest
@pytest.mark.frontend
def test_page_loads(page, live_server):
"""Verify the SPA loads and the login overlay appears."""
# The page should have loaded from the live_server
assert page.title() == "Canteen Asset Tracker"
# Login overlay should be visible (initAuth → checkAuthGate → showLogin)
overlay = page.locator("#loginOverlay")
assert overlay.is_visible(), "Login overlay should be visible on load"
# Check for key elements
assert "Canteen Assets" in page.locator("h1").inner_text()
assert page.locator("#loginUsername").is_visible()
assert page.locator("#loginPassword").is_visible()
assert page.locator("button:has-text('Sign In')").is_visible()