Skip to content

test: pin outbound drill payloads carry range + anchor#87

Merged
tomfunk merged 1 commit into
devfrom
followup/outbound-drill-tests
Jun 15, 2026
Merged

test: pin outbound drill payloads carry range + anchor#87
tomfunk merged 1 commit into
devfrom
followup/outbound-drill-tests

Conversation

@tomfunk

@tomfunk tomfunk commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #83. That PR fixes Esc preserving the dashboard month by threading range + anchor through every Dashboard drill site, but the tests only assert the return trip (Transactions → Dashboard). The six outbound drill sites had no direct coverage, so a regression on the Dashboard side would pass silently.

These tests pin the outbound payload for each site:

  • TUI Dashboard (tests/tui/screens.test.tsx): category, flex, account, merchant, and 2-shortcut drills
  • GUI Dashboard (tests/gui/dashboard.test.tsx): extended the existing category-click test to assert range, anchor; added a flex-tier click test for the no-selectedAccount path

The merchant drill gets its own assertion because it's the only site sourcing anchor from merchantDrill.from rather than the dashboard's current period from.

Test plan

  • npx vitest run — 636 / 636 passing locally
  • Each test uses expect.objectContaining({ range, anchor }), so dropping either field at any of the six call sites will fail the corresponding assertion

🤖 Generated with Claude Code

PR #83's fix relies on every Dashboard drill site emitting the period
(range + anchor=from) so Esc can restore the same month. The Transactions-
side tests already cover the return trip; these tests pin the originating
payload for each of the six drill sites so a regression on the Dashboard
side can't pass silently:

- TUI category, flex, account, merchant, and '2'-shortcut drills
- GUI category drill (extended existing test) and flex-tier click

The merchant drill is called out separately because it's the only site
sourcing anchor from merchantDrill.from rather than the current period from.
@tomfunk tomfunk merged commit 0117a2b into dev Jun 15, 2026
3 checks passed
@tomfunk tomfunk deleted the followup/outbound-drill-tests branch June 15, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant