Repository navigation
test(web): split CommentsPanelTests, AccessibleNamesTests and PlayStatsTests under the 400-line limit (0.6.0 #268) - #283
Merged
Conversation
…tsTests under the 400-line limit (0.6.0 #268) AGENTS.md keeps a source file under about 400 lines, and #268 item 5 (#205 story 2) lists three Web test files past it. Each is split by the behaviour its tests cover. No test is added, removed, renamed or changed: every [TestMethod] block, with its comments and attributes, moves byte for byte. - CommentsPanelTests (644 lines) keeps the list tests; the add, edit and delete, stale-edit, busy-guard and discard tests move to CommentsPanelAddTests, CommentsPanelEditAndDeleteTests, CommentsPanelStaleEditTests, CommentsPanelBusyGuardTests and CommentsPanelDiscardTests. - AccessibleNamesTests (524 lines) keeps the names, toggles, headings, tags and page-title tests; the focus-return tests move to FocusReturnTests. - PlayStatsTests (402 lines) keeps offered, wins, names and order; the Activity performance section (#136) moves to PlayStatsActivityPerformanceTests. The shared state and helpers of each family live in one abstract fixture (CommentsPanelFixture, AccessibleNamesFixture, PlayStatsFixture), the pattern CommentsFromEventDetailsFixture and DialogSafetyFixture already use, so nothing is copied. Every touched file is now at most 294 lines. Closes #268
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
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
#268 item 5 (#205 story 2): three Web test files over the 400-line rule in
AGENTS.md, split by behaviour. No test is added, removed, renamed or changed. Every[TestMethod]block, with its comments and attributes, moves byte for byte.Each family shares its state and helpers through one abstract fixture, the pattern
CommentsFromEventDetailsFixtureandDialogSafetyFixturealready use. Nothing is copied. The helpers are instance members over per-test state (api,harness, the Comments, the library), so aninternal staticclass could not hold them without passing that state on every call. Static view helpers stay where they were (CommentsPanelView,PageActions).Evidence
Base
origin/dev6d7f2c6(the card expectedea40dc0;devmoved by #280 while this ran:FeedbackLinkCopyTests.csandEventDetailsDialog.razor, outside scope. Rebased cleanly, and every number below is from the new tip). Cold builds (clean-build.sh):6d7f2c6--list-testsnames, base vs head:diffis empty (exit 0).diffis empty (exit 0). The TRX list is added because--list-testsprints one line fewer than the run's total on both sides.[TestMethod]blocks of the three files at base reappear exactly once across the 10 test files, byte for byte (0 missing, 0 new or changed).CommentsPanelStaleEditTests.SavingCommentAThenCommentB_SendsEachCommentsOwnTag: expectedTagB->TagA: FailedFocusReturnTests.DeleteConfirmed_RestoresFocusAfterTheDelete: expected delete count1->2: FailedPlayStatsActivityPerformanceTests.WinRate_IsWinsDividedByOffered: expected0.25m->0.5m: FailedMerge Danger
Door: two-way. Only test files move.
Blast Radius: tests. No production code, no
.github/, no other test file.SlotPlannerTestsandSlotRerollTestsare left to their parallel card.Notes
Closes #268, as the card says. It takes effect whendevreachesmain, and Nerd closes the issue by hand. TheSlotPlannerTestsandSlotRerollTestspart of item 5 is on a parallel card, so check that card before closing #268.