Calendar tests mint the dated card they wait on #231

Merged
Grandiras merged 2 commits from calendar-tests-mint-their-cards into main 2026-09-23 15:51:01 +00:00
Owner

docs/testing.md says a spec has to pass on an empty stack, and that anything under .calendar-grid needs a dated card, because a month with nothing due renders its empty state instead of the grid. Four tests in calendar.spec.js broke that rule. They passed in a full file run only because earlier tests had left cards due this month, and a tag, on the board.

Test What it now makes first
with motion › the month cascades in once, on the render that survives a card due this month, plus one due next month, because the test pages forward and expects the grid there too
with motion › an entrance that never fires still leaves the month visible a card due this month (the test waits on .calendar-week, which is also absent in an empty month)
Phone › the toolbar starts its row, and the tag legend folds behind a button a card due this month, plus a tag: .calendar-filter-toggle only renders on a board that has one
Phone › swiping sideways pages the month, and scrolling does not a card due this month

Test titles are unchanged. Supporting changes:

  • createTag(page, name): the tag-making block from the legend test, moved into a helper so the toolbar test can use it too. It now goes to the board's own /board/{key}/settings/tags page instead of the /admin/tags redirect.
  • inMonths(months, day): sits next to inYears, for the cascade test's next-month card.
  • docs/testing.md: records that these four were green only because of what earlier tests left behind. New tests should be run alone (-g) on a fresh stack. Also adds calendar.spec.js to the list of specs that have a createTag.

Verification

Run on an isolated, port-shifted stack (name: ponentecal, fresh volumes). The shared ponente stack is owned by the main checkout and was not touched.

  • Before: the original four, run alone on the empty stack: 4 failed (.calendar-grid / .calendar-week not found).
  • After: each fixed test in its own run, starting from 0 cards and 0 tags: 4 passed. Teardown left 0 cards and 0 tags afterwards.
  • Full calendar.spec.js: 21 passed.
  • tools/verify.sh: build OK, 560/560 unit tests pass (including DocumentationTests).

Tests only, so no changelog line.

🤖 Generated with Claude Code

`docs/testing.md` says a spec has to pass on an empty stack, and that anything under `.calendar-grid` needs a dated card, because a month with nothing due renders its empty state instead of the grid. Four tests in `calendar.spec.js` broke that rule. They passed in a full file run only because earlier tests had left cards due this month, and a tag, on the board. | Test | What it now makes first | |---|---| | with motion › the month cascades in once, on the render that survives | a card due this month, plus one due **next** month, because the test pages forward and expects the grid there too | | with motion › an entrance that never fires still leaves the month visible | a card due this month (the test waits on `.calendar-week`, which is also absent in an empty month) | | Phone › the toolbar starts its row, and the tag legend folds behind a button | a card due this month, plus **a tag**: `.calendar-filter-toggle` only renders on a board that has one | | Phone › swiping sideways pages the month, and scrolling does not | a card due this month | Test titles are unchanged. Supporting changes: - `createTag(page, name)`: the tag-making block from the legend test, moved into a helper so the toolbar test can use it too. It now goes to the board's own `/board/{key}/settings/tags` page instead of the `/admin/tags` redirect. - `inMonths(months, day)`: sits next to `inYears`, for the cascade test's next-month card. - `docs/testing.md`: records that these four were green only because of what earlier tests left behind. New tests should be run alone (`-g`) on a fresh stack. Also adds `calendar.spec.js` to the list of specs that have a `createTag`. ## Verification Run on an isolated, port-shifted stack (`name: ponentecal`, fresh volumes). The shared `ponente` stack is owned by the main checkout and was not touched. - **Before:** the original four, run alone on the empty stack: **4 failed** (`.calendar-grid` / `.calendar-week` not found). - **After:** each fixed test in its own run, starting from 0 cards and 0 tags: **4 passed**. Teardown left 0 cards and 0 tags afterwards. - Full `calendar.spec.js`: **21 passed**. - `tools/verify.sh`: build OK, 560/560 unit tests pass (including `DocumentationTests`). Tests only, so no changelog line. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Calendar tests mint the dated card they wait on
All checks were successful
CI / build (pull_request) Successful in 42s
661f662373
Four calendar tests waited on the month grid (or its week rows) without
dating a card first, and the toolbar test also opened a filter button that
only renders on a board with a tag. They passed in a full file run only
because earlier tests had left cards and a tag behind; run alone on a fresh
stack, each one met the empty state instead of the grid.

Each now mints what it needs: a card due this month (and, for the cascade
test, one due next month, the month it pages to), and a tag for the
toolbar test through a createTag helper lifted out of the legend test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🤖 Reviewing this PR — the review will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the review runs.

🤖 Reviewing this PR — the review will link the full session transcript. <!-- opencode-run:review --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-231/run-2026-09-23T15-17-42-588Z.md) — updating every ~5 minutes while the review runs.
opencode-reviewer left a comment

✅ Verdict: approve — no blocking issues found.

Good to merge. The four tests' premises check out against the app: Calendar.razor renders the empty state instead of the grid when the month has nothing in scope, and .calendar-filter-toggle only when the board has tags — so each test now mints what it waits on. inMonths handles the December→January rollover correctly via Date.UTC normalization, and day 24 avoids month-length edges. The new createTag uses the real /board/{BoardRef}/settings/tags route (naming the board explicitly instead of relying on the bare /admin/tags redirect's substitution), its row-count confirmation works from an empty board (no table → 0 rows → 1), and tag cleanup is covered by the spec-agnostic id high-water mark. The toolbar test's .segmented measurement reads the view switch in .calendar-actions, which the new fixtures don't affect. Docs match the code, and the file's 21 tests match the reported full run.

Two remarks, neither blocking: the helper's comment "the name is checked on the board, where the chip renders it" is inherited from the legend test where that was literally true — the toolbar test asserts the toggle's presence (which does imply the tag exists) but never checks the name itself; and boards.spec.js also has a per-board createTag (line 125) that the docs list doesn't mention, though that one targets freshly created boards rather than the seeded one, so the list arguably describes a different fixture pattern.


⏱ 6m 14s · 17 steps · $0.0448 · tokens: 152.6k in / 13.8k out (+490.8k cache-read) · Go: 5h 1% · wk 84% · mo 74%
📜 Full session transcript

✅ **Verdict: approve** — no blocking issues found. Good to merge. The four tests' premises check out against the app: `Calendar.razor` renders the empty state instead of the grid when the month has nothing in scope, and `.calendar-filter-toggle` only when the board has tags — so each test now mints what it waits on. `inMonths` handles the December→January rollover correctly via `Date.UTC` normalization, and day 24 avoids month-length edges. The new `createTag` uses the real `/board/{BoardRef}/settings/tags` route (naming the board explicitly instead of relying on the bare `/admin/tags` redirect's substitution), its row-count confirmation works from an empty board (no table → 0 rows → 1), and tag cleanup is covered by the spec-agnostic id high-water mark. The toolbar test's `.segmented` measurement reads the view switch in `.calendar-actions`, which the new fixtures don't affect. Docs match the code, and the file's 21 tests match the reported full run. Two remarks, neither blocking: the helper's comment "the name is checked on the board, where the chip renders it" is inherited from the legend test where that was literally true — the toolbar test asserts the toggle's presence (which does imply the tag exists) but never checks the name itself; and `boards.spec.js` also has a per-board `createTag` (line 125) that the docs list doesn't mention, though that one targets freshly created boards rather than the seeded one, so the list arguably describes a different fixture pattern. --- ⏱ 6m 14s · 17 steps · $0.0448 · tokens: 152.6k in / 13.8k out (+490.8k cache-read) · Go: 5h 1% · wk 84% · mo 74% 📜 [Full session transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-231/run-2026-09-23T15-17-42-588Z.md) <!-- opencode-reviewed-head:661f6623736385b3d2cee4c9996afccf9560da7c --> <!-- opencode-verdict:approve -->
Collaborator

🤖 Resolving the merge conflicts — the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the fix runs.

🤖 Resolving the merge conflicts — the reply will link the full session transcript. <!-- opencode-run:conflict --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-231/run-2026-09-23T15-42-00-584Z.md) — updating every ~5 minutes while the fix runs.
Merge remote-tracking branch 'origin/main' into calendar-tests-mint-their-cards
All checks were successful
CI / build (pull_request) Successful in 37s
d5ed47b926
# Conflicts:
#	docs/testing.md
#	tests/e2e/calendar.spec.js
Collaborator

Merge committed cleanly, working tree clean. Summary for the PR:


Merge resolved

What conflicted: main landed #229 (debloat: prose in docs/testing.md cut to bullet sections, comments in tests/e2e/calendar.spec.js condensed, and the spec refactored onto the shared devLoginToBoard helper) on top of the same hunks this PR edits (minting dated cards/tags so calendar tests pass alone on a fresh stack).

How each side survived:

  • tests/e2e/calendar.spec.js — kept main's debloated wording, chip helper and devLoginToBoard import, and kept the PR's six fixture additions: inMonths(), the board-scoped createTag() helper (the "legend filters" test and the phone toolbar test mint their own tag now), and dated cards minted in the cascade, entrance, toolbar and swipe tests. The PR-side hunks still called the old local devLogin, which main deleted — those resolved to devLoginToBoard, so nothing references a function that no longer exists.
  • docs/testing.md — kept main's condensed structure (traps / fixtures / writing-a-test bullets) and carried the PR's new lesson into the matching bullet: four calendar tests were green only because earlier tests left cards due this month, so run a new test alone (-g) on a fresh stack; also added calendar.spec.js to the files with their own createTag.

Verified: no markers left in either file; spec passes node --check and every top-level helper it defines is used and traceable; the board-scoped /board/{BoardRef}/settings/tags route the new createTag targets still exists after main's settings-page refactor; DocumentationTests (the unit suite's checker that every spec is named in docs/) pass: 8/8.

→ Merge resolved and pushed; a re-review follows.


⏱ 5m 32s · 20 steps · $0.0798 · tokens: 306.5k in / 15.6k out (+659.6k cache-read) · Go: 5h 3% · wk 85% · mo 75%

📜 Full session transcript

Merge committed cleanly, working tree clean. Summary for the PR: --- ## Merge resolved **What conflicted:** main landed #229 (debloat: prose in `docs/testing.md` cut to bullet sections, comments in `tests/e2e/calendar.spec.js` condensed, and the spec refactored onto the shared `devLoginToBoard` helper) on top of the same hunks this PR edits (minting dated cards/tags so calendar tests pass alone on a fresh stack). **How each side survived:** - `tests/e2e/calendar.spec.js` — kept main's debloated wording, `chip` helper and `devLoginToBoard` import, and kept the PR's six fixture additions: `inMonths()`, the board-scoped `createTag()` helper (the "legend filters" test and the phone toolbar test mint their own tag now), and dated cards minted in the cascade, entrance, toolbar and swipe tests. The PR-side hunks still called the old local `devLogin`, which main deleted — those resolved to `devLoginToBoard`, so nothing references a function that no longer exists. - `docs/testing.md` — kept main's condensed structure (traps / fixtures / writing-a-test bullets) and carried the PR's new lesson into the matching bullet: four calendar tests were green only because earlier tests left cards due this month, so **run a new test alone (`-g`) on a fresh stack**; also added `calendar.spec.js` to the files with their own `createTag`. **Verified:** no markers left in either file; spec passes `node --check` and every top-level helper it defines is used and traceable; the board-scoped `/board/{BoardRef}/settings/tags` route the new `createTag` targets still exists after main's settings-page refactor; `DocumentationTests` (the unit suite's checker that every spec is named in `docs/`) pass: 8/8. → Merge resolved and pushed; a re-review follows. --- ⏱ 5m 32s · 20 steps · $0.0798 · tokens: 306.5k in / 15.6k out (+659.6k cache-read) · Go: 5h 3% · wk 85% · mo 75% 📜 [Full session transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/pr-231/run-2026-09-23T15-42-00-584Z.md) <!-- opencode-session:ses_f3111a8eeffeXKYIMZltMeGTg9 -->
Collaborator

🤖 On it — the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 On it — the reply will link the full session transcript. <!-- opencode-run:task --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/issue-231/run-2026-09-23T15-47-33-127Z.md) — updating every ~5 minutes while the task runs.
Collaborator

Nothing new was asked on the thread; the follow-up wanted the repo's own verification run before any claims. Done against the fresh clone at task-231-muea12tj (my merge commit d5ed47b is intact on calendar-tests-mint-their-cards):

  • tools/verify.sh (the bar): dotnet build -c Release clean, dotnet test 558/558 passed, including DocumentationTests.
  • tools/verify.sh e2e calendar.spec.js (the spec this PR pins): not verified here — this container has no podman/docker, and the script itself says so and falls back to "build + unit tests are the bar" rather than faking a result. The e2e run remains for CI or a machine with a container engine.

That's everything the follow-up asked for.


⏱ 2m 44s · 35 steps · $0.1304 · tokens: 402.6k in / 17.0k out (+1934.8k cache-read) · Go: 5h 3% · wk 85% · mo 75%

📜 Full session transcript

Nothing new was asked on the thread; the follow-up wanted the repo's own verification run before any claims. Done against the fresh clone at `task-231-muea12tj` (my merge commit `d5ed47b` is intact on `calendar-tests-mint-their-cards`): - **`tools/verify.sh`** (the bar): `dotnet build -c Release` clean, `dotnet test` **558/558 passed**, including `DocumentationTests`. - **`tools/verify.sh e2e calendar.spec.js`** (the spec this PR pins): **not verified here** — this container has no podman/docker, and the script itself says so and falls back to "build + unit tests are the bar" rather than faking a result. The e2e run remains for CI or a machine with a container engine. That's everything the follow-up asked for. --- ⏱ 2m 44s · 35 steps · $0.1304 · tokens: 402.6k in / 17.0k out (+1934.8k cache-read) · Go: 5h 3% · wk 85% · mo 75% 📜 [Full session transcript](https://git.grandiras.net/Grandiras/opencode-bot/src/branch/opencode-logs/transcripts/Grandiras/Ponente/issue-231/run-2026-09-23T15-47-33-127Z.md)
Grandiras deleted branch calendar-tests-mint-their-cards 2026-09-23 15:51:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grandiras/Ponente!231
No description provided.