test(elementTree): move the last local find copies and the texts copies onto the shared helper (#495) #510

Merged
maximus merged 3 commits from issue-495-shared-find-texts into main 2026-10-28 01:44:34 +00:00

3 commits

Author SHA1 Message Date
le king fu
2c8bcf19f5 test: restore the space the move to elementTree took from HierarchyCheckModal (#495)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m27s
The edit that removed the local `find` of
HierarchyCheckModal.wiring.test.ts left `const node =(id: …`; found by
the self-review of the PR. Whitespace only.

Resolves #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:23:25 -04:00
le king fu
a15a120caf docs: describe texts and count the users of src/test/elementTree.ts (#495)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m28s
The elementTree paragraph of docs/architecture.md describes `texts` and
replaces the list of users and the sentence about the fifteen local copies
by a count, 23 test files on 2026-10-26, seven of them importing `texts`,
each with the command that lists them. It names the two `const texts` of
the deletion tests of #467, whose meaning differs, so that nobody takes
them for leftover copies.

Resolves #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:15:17 -04:00
le king fu
1d2cb32c29 test: share texts and move the last local find copies onto src/test/elementTree.ts (#495)
Add `texts` to src/test/elementTree.ts: every string of the tree, depth
first, through arrays at any depth and fragments, each string as it is; a
number is not a string and is left out, never rendered (Max's decision of
2026-10-24). Eight cases of elementTree.test.ts prove each point.

The fifteen test files that kept a copy of `find` import the shared one,
and the seven of them that kept a copy of `texts` import that too. The
copies had the same traversal: same tests (137), same names, all green.
The eleven calls by type become predicates (`(el) => el.type === X`), the
Fragment search of TransactionTable.wiring.test.ts included. Only the
imports tsc reports as unused go; `expand` keeps its own in
OnboardingChecklist.test.tsx and ImportEmptyState.test.tsx.

The `const texts` of CategoryDetailPanel.delete.test.ts and
AccountsPage.delete.test.ts, of another meaning, stay as they are.

Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:12:04 -04:00