test: pin outbound drill payloads carry range + anchor#87
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #83. That PR fixes Esc preserving the dashboard month by threading
range+anchorthrough 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:
tests/tui/screens.test.tsx): category, flex, account, merchant, and2-shortcut drillstests/gui/dashboard.test.tsx): extended the existing category-click test to assertrange, anchor; added a flex-tier click test for the no-selectedAccountpathThe merchant drill gets its own assertion because it's the only site sourcing
anchorfrommerchantDrill.fromrather than the dashboard's current periodfrom.Test plan
npx vitest run— 636 / 636 passing locallyexpect.objectContaining({ range, anchor }), so dropping either field at any of the six call sites will fail the corresponding assertion🤖 Generated with Claude Code