Update docs to reflect date+time+title slug format
- qa-test-plan: update expected folder, URL, and automation greps in TC-P.5, TC-P.6, TC-P.7; add slug explanation block to test data; rewrite TC-P.10 to cover two posts on the same day (now valid) - bugs-and-fixes: add BUG-003 documenting the silent duplicate-date failure and the slug fix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-12
@@ -336,6 +336,12 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
| Longitude | `139.691711` |
|
||||
| Photos | none (keep simple for first run) |
|
||||
|
||||
**Expected slug:** `2026-06-18-1000-qa-test-entry`
|
||||
**Expected folder:** `2026-06-18-1000-qa-test-entry.entry/`
|
||||
**Expected URL:** `/tracker/2026-06-18-1000-qa-test-entry.entry`
|
||||
|
||||
The slug is built from `date(Y-m-d-Hi)` + title lowercased with `[^a-z0-9]+` replaced by hyphens.
|
||||
|
||||
---
|
||||
|
||||
### TC-P.1: Post form requires authentication
|
||||
@@ -405,8 +411,8 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
| Step | Action | Expected Result |
|
||||
|---|---|---|
|
||||
| 1 | After TC-P.4 completes | — |
|
||||
| 2 | Check directory `user/pages/01.tracker/` | Folder `2026-06-18.entry/` exists (add-page-by-form appends template name per `physical_template_name: true`) |
|
||||
| 3 | Read `user/pages/01.tracker/2026-06-18.entry/entry.md` | File exists |
|
||||
| 2 | Check directory `user/pages/01.tracker/` | Folder `2026-06-18-1000-qa-test-entry.entry/` exists (add-page-by-form appends template name per `physical_template_name: true`) |
|
||||
| 3 | Read `user/pages/01.tracker/2026-06-18-1000-qa-test-entry.entry/entry.md` | File exists |
|
||||
| 4 | Verify frontmatter `title` | Equals `QA Test Entry` |
|
||||
| 5 | Verify frontmatter `date` | Equals `2026-06-18 10:00` |
|
||||
| 6 | Verify frontmatter `location_city` | Equals `Tokyo` |
|
||||
@@ -430,10 +436,10 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
| 3 | Entry card present | Card with title `QA Test Entry` visible |
|
||||
| 4 | Date shown on card | `18 Jun 2026` |
|
||||
| 5 | Location badge on card | `📍 Tokyo, Japan` visible |
|
||||
| 6 | Entry card link | `href` points to `/tracker/2026-06-18.entry` |
|
||||
| 6 | Entry card link | `href` points to `/tracker/2026-06-18-1000-qa-test-entry.entry` |
|
||||
| 7 | Excerpt shown | Partial text of the body content visible |
|
||||
|
||||
**Automation:** curl /tracker; grep for "QA Test Entry", "18 Jun 2026", "Tokyo", "Japan", "/tracker/2026-06-18.entry"
|
||||
**Automation:** curl /tracker; grep for "QA Test Entry", "18 Jun 2026", "Tokyo", "Japan", "/tracker/2026-06-18-1000-qa-test-entry.entry"
|
||||
|
||||
---
|
||||
|
||||
@@ -441,7 +447,7 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
|
||||
| Step | Action | Expected Result |
|
||||
|---|---|---|
|
||||
| 1 | GET http://100.96.115.96:8081/tracker/2026-06-18.entry | Page loads (200) |
|
||||
| 1 | GET http://100.96.115.96:8081/tracker/2026-06-18-1000-qa-test-entry.entry | Page loads (200) |
|
||||
| 2 | Page title | `QA Test Entry` in `<h1>` |
|
||||
| 3 | Date header | `Thursday, 18 June 2026` (or locale equivalent) |
|
||||
| 4 | Location badge | `📍 Tokyo, Japan` |
|
||||
@@ -449,7 +455,7 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
| 6 | No gallery | Photo gallery section absent (no photos were uploaded) |
|
||||
| 7 | Back link | `← Back to journal` link present, points to /tracker |
|
||||
|
||||
**Automation:** curl /tracker/2026-06-18.entry; grep for "QA Test Entry", "Tokyo", "Japan", "This is the QA test body", "Back to journal"
|
||||
**Automation:** curl /tracker/2026-06-18-1000-qa-test-entry.entry; grep for "QA Test Entry", "Tokyo", "Japan", "This is the QA test body", "Back to journal"
|
||||
|
||||
---
|
||||
|
||||
@@ -478,17 +484,18 @@ These scenarios cover the full round-trip: filling the form → saving → verif
|
||||
|
||||
---
|
||||
|
||||
### TC-P.10: Duplicate date handling
|
||||
### TC-P.10: Two posts on the same day
|
||||
|
||||
| Step | Action | Expected Result |
|
||||
|---|---|---|
|
||||
| 1 | Submit a second post with the same date `2026-06-18 10:00` | — |
|
||||
| 2 | Observe result | Either: error shown, OR new entry created at a different slug |
|
||||
| 3 | Check filesystem | No silent data loss — original entry intact |
|
||||
| 1 | Submit a first post: date `2026-06-18 10:00`, title `Morning Update` | Success message shown |
|
||||
| 2 | Submit a second post: date `2026-06-18 14:30`, title `Afternoon Update` | Success message shown |
|
||||
| 3 | Check filesystem | Two separate folders exist: `2026-06-18-1000-morning-update.entry/` and `2026-06-18-1430-afternoon-update.entry/` |
|
||||
| 4 | Visit /tracker | Both entries visible as separate cards |
|
||||
|
||||
**Note:** `overwrite_mode: false` on add-page-by-form plugin should prevent overwrite. Behavior on conflict is to be documented here after first run.
|
||||
**Note:** The slug encodes date + time + title, so same-day posts are fully supported as long as they have different times or titles. A true collision (same date, same time, same title) would silently fail — treat this as acceptable given solo use.
|
||||
|
||||
**Manual verification required:** Requires two submissions with same date
|
||||
**Manual verification required:** Requires two browser submissions
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user