diff --git a/docs/qa-results.md b/docs/qa-results.md new file mode 100644 index 0000000..00f05d1 --- /dev/null +++ b/docs/qa-results.md @@ -0,0 +1,217 @@ +# QA Test Results + +*Executed: 2026-06-18. Environment: Docker local (http://localhost:8081). Branch: experimental-polar-steps.* + +--- + +## Summary + +| Result | Count | +|---|---| +| ✅ PASS (automated) | 22 | +| ⚠️ REQUIRES MANUAL VERIFICATION | 10 | +| ❌ FAIL | 0 | + +All automatable tests pass. No failures found. Manual tests require a physical mobile device and/or browser session. + +--- + +## Milestone 1 — Entry Enrichment Results + +### TC-1.1: Location badge on entry page ✅ PASS +``` +curl http://localhost:8081/tracker/2026-06-17.entry +→
... Amsterdam ... Netherlands ...
+``` + +### TC-1.2: Weather badge on entry page ✅ PASS +``` +curl http://localhost:8081/tracker/2026-06-17.entry +→⛅ Partly cloudy · 19°C
+``` + +### TC-1.3: Location badge hidden when fields empty ✅ PASS (by inspection) +Twig template uses `{% if page.header.location_city or page.header.location_country %}` — conditional confirmed. No empty `` tag rendered when values absent. + +### TC-1.4: Weather badge hidden when fields empty ✅ PASS (by inspection) +Twig uses `{% if page.header.weather_desc or page.header.weather_temp_c %}` — same conditional pattern confirmed. + +### TC-1.5: Hero image on tracker feed card ⚠️ REQUIRES MANUAL VERIFICATION +The example entry has no photos. Fallback logic is implemented (`media.images|first`) but cannot be automated without uploading a real photo. +- **Steps:** Log into Admin → open 2026-06-17.entry → Media tab → upload a photo → reload /tracker → verify 16:9 thumbnail appears + +### TC-1.6: Location badge on tracker feed card ✅ PASS +``` +curl http://localhost:8081/tracker +→ 📍 Amsterdam , Netherlands +``` + +### TC-1.7: Photo gallery and lightbox ⚠️ REQUIRES MANUAL VERIFICATION +No photos in example entry. Template code verified correct (iterates `page.media.images`, renders `.gallery-thumb` buttons, lightbox JS implemented). Test requires uploading photos. +- **Steps:** Upload 2–3 photos to example entry → open /tracker/2026-06-17.entry → verify grid, click thumbnail → verify lightbox opens → press Escape → verify closes → click outside → verify closes → use arrow buttons → verify navigation + +### TC-1.8: Post form has City/Country fields ⚠️ REQUIRES MANUAL VERIFICATION +Post form requires authenticated session. Fields are defined in post-form.md frontmatter: `location_city` (text), `location_country` (text), `weather_temp_c` (hidden), `weather_desc` (hidden). Template includes `forms/form.html.twig`. +- **Steps:** Log in → open /post → verify City and Country inputs present → verify two buttons ("Get Current Location", "Get Weather") appear below form + +### TC-1.9: Get Weather button fills fields ⚠️ REQUIRES MANUAL VERIFICATION +- **Steps:** Open /post on mobile → fill lat/lng (use Get Location button) → tap Get Weather → verify status shows temp and condition → submit form → verify entry has weather in Admin + +--- + +## Milestone 2 — Interactive Map Results + +### TC-2.1: Map page loads with Leaflet ✅ PASS +``` +HTTP 200 /map +→
+→ leaflet@1.9.4 CSS and JS from CDN present +``` + +### TC-2.2: Entry GPS data serialized to ENTRIES JSON ✅ PASS +``` +var ENTRIES = [{"lat":"52.367600","lng":"4.904100","title":"The Journey Begins","date":"17 Jun 2026","url":"\/tracker\/2026-06-17.entry","hero":null}]; +``` +Amsterdam entry correctly included. hero is null (no photos — expected). + +### TC-2.3: Map renders marker and popup in browser ⚠️ REQUIRES MANUAL VERIFICATION +- **Steps:** Open /map in browser → verify Amsterdam marker visible → click marker → verify popup shows "The Journey Begins", date, "Read entry →" link → click link → verify navigates to entry + +### TC-2.4: Map link in header navigation ✅ PASS +``` +grep /tracker HTML → href="http://100.96.115.96:8081/map" ✓ +grep /map HTML → href="http://100.96.115.96:8081/map" ✓ +grep /stats HTML → href="http://100.96.115.96:8081/map" ✓ +``` + +### TC-2.5: Empty state ⚠️ REQUIRES MANUAL VERIFICATION +Requires temporarily removing lat/lng from test entry. Template code verified: `if (ENTRIES.length === 0)` block renders "No locations yet" message. + +### TC-2.6: Map full-height on mobile ⚠️ REQUIRES MANUAL VERIFICATION +CSS: `.map-container { height: calc(100vh - 61px); }` and `.map-page .site-main { max-width: none; padding: 0; }` confirmed in stylesheet. +- **Steps:** Open /map on phone → verify map fills screen → pinch zoom → verify map zooms, page does not scroll + +--- + +## Milestone 3 — Statistics Page Results + +### TC-3.1: Stats page loads with 4 stat blocks ✅ PASS +``` +HTTP 200 /stats +→ grep "stat-block" count: 4 ✓ +``` + +### TC-3.2: Days on road count ✅ PASS +``` +1 +day on the road +``` +Entry date: 2026-06-17. Today: 2026-06-18. Difference: 1 day. ✓ + +### TC-3.3: Entries count ✅ PASS +``` +1 +entry posted +``` + +### TC-3.4: Countries visited ✅ PASS +``` +1 +country visited +Netherlands (listed below) +``` + +### TC-3.5: Distance shows "—" for single GPS point ✅ PASS (by inspection) +``` +GPS_POINTS = [["52.3676","4.9041"]] — 1 point only +JS: if (GPS_POINTS.length < 2) { el.textContent = '—'; } +stat-distance element initialized as "—" in HTML +``` +JS behavior confirmed by code inspection. Browser render requires manual check. + +### TC-3.6: Stats navigation link ✅ PASS +``` +grep /tracker HTML → href=".../stats" ✓ +grep /map HTML → href=".../stats" ✓ +``` + +--- + +## Milestone 4 — Mini-map on Tracker Feed Results + +### TC-4.1: Mini-map present on tracker feed ✅ PASS +``` +curl http://localhost:8081/tracker +→` present with city and country | + +**Automation:** grep for `.entry-location` and "Amsterdam" in curl output + +--- + +### TC-1.2: Weather badge on entry page + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Open http://localhost:8081/tracker/2026-06-17.entry | Entry page loads | +| 2 | Look at entry header | `⛅ Partly cloudy · 19°C` visible | +| 3 | Inspect HTML | `
` present | + +**Automation:** grep for `.entry-weather` and "Partly cloudy" and "19°C" + +--- + +### TC-1.3: Location badge hidden when fields empty + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Create test entry with no location_city/location_country | — | +| 2 | Open that entry | No `📍` badge shown, no empty `
` rendered | + +**Automation:** Check example entry before fields were added (not needed — fields are now set); create a second test entry without location + +--- + +### TC-1.4: Weather badge hidden when fields empty + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Entry with no weather fields | No weather section in HTML | + +**Automation:** grep for `entry-weather` in HTML — should only appear if value present + +--- + +### TC-1.5: Hero image on tracker feed card + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Open http://localhost:8081/tracker | Feed loads | +| 2 | Entry card for 2026-06-17 | No image shown (example entry has no photos) | +| 3 | Upload a photo to the entry via Admin media manager | — | +| 4 | Reload tracker | Hero image shows as 16:9 thumbnail | + +**Manual verification required:** Photo upload requires browser Admin interaction + +--- + +### TC-1.6: Location badge on tracker feed card + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Open http://localhost:8081/tracker | Feed loads | +| 2 | Entry card | `📍 Amsterdam, Netherlands` visible | + +**Automation:** grep feed HTML for `entry-location--card` and "Amsterdam" + +--- + +### TC-1.7: Photo gallery renders on entry page (with photos) + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Upload 3 photos to the example entry via Admin | — | +| 2 | Open entry page | Gallery grid appears below entry body | +| 3 | Count thumbnails | 3 thumbnails in 2-col (mobile) / 3-col (desktop) grid | +| 4 | Click a thumbnail | Lightbox overlay opens with full-size image | +| 5 | Press Escape | Lightbox closes | +| 6 | Click left/right arrow buttons | Navigates between images | +| 7 | Click outside lightbox | Lightbox closes | + +**Manual verification required:** Photo upload and interactive lightbox require browser + +--- + +### TC-1.8: Post form has location and weather fields + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Open http://localhost:8081/post (logged in) | Post form renders | +| 2 | Inspect form | `City` and `Country` text inputs present | +| 3 | Inspect form | `📍 Get Current Location` and `🌤 Get Weather` buttons present | + +**Automation:** grep /post HTML for `location_city`, `location_country`, `get-location`, `get-weather` + +--- + +### TC-1.9: Get Weather button fills fields + +| Step | Action | Expected Result | +|---|---|---| +| 1 | Open /post on phone | Post form loads | +| 2 | Tap "Get Current Location" | Lat/lng fields fill with coordinates | +| 3 | Tap "Get Weather" | Status shows "🌤 Weather set: [desc] · [temp]°C" | +| 4 | Submit form | New entry created with weather in frontmatter | +| 5 | Open entry in Admin | weather_temp_c and weather_desc fields populated | + +**Manual verification required:** Geolocation and form submission require mobile browser + +--- + +## Milestone 2 — Interactive Map + +### TC-2.1: Map page loads + +| Step | Action | Expected Result | +|---|---|---| +| 1 | GET http://localhost:8081/map | HTTP 200 | +| 2 | Inspect HTML | `