Repository navigation
test(web): migrate browser tests to the disposable render helper (5/8) - #22270
Merged
Merged
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR migrates 17 browser-test files to disposable rendering and changes only ignored test-harness paths. Its impact is limited to test setup, cleanup, mocks, timers, and assertions, with no product runtime or default changes. Notes:
You can add or adjust custom eligibility rules. Learn more. |
macroscopeapp
Bot
dismissed
their stale review
October 20, 2026 10:37
Dismissing prior approval to re-evaluate 4213cba
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.
Migrate chunk 5 of the remaining web browser tests to the disposable render helper approved in #22187. Tests now own their roots, timers, global stubs, and spies through disposables; shared mock state resets with explicit setup calls. Existing cases and assertions are preserved, including early unmount and remount coverage.
The baseline lint list contains 132 files, sorted into chunks of ceil(132 / 8) = 17. This PR changes only chunk 5 (positions 69–85), based exactly on ab423b2.
Files (under
apps/web/):src/components/diffs/StyledDiffCodeView.browser.test.tsxsrc/components/files/AttachmentFilePreview.browser.test.tsxsrc/components/files/BrowserDocumentFrame.browser.test.tsxsrc/components/files/FileBrowserPanel.browser.test.tsxsrc/components/files/useFileSaveCoordinator.browser.test.tsxsrc/components/media/AttachmentImage.browser.test.tsxsrc/components/onboarding/WelcomeWizard.browser.test.tsxsrc/components/onboarding/WelcomeWizard.terminal.browser.test.tsxsrc/components/permissions/usePermissionStatus.browser.test.tsxsrc/components/preview/PreviewEmptyState.browser.test.tsxsrc/components/preview/PreviewFaviconIcon.browser.test.tsxsrc/components/preview/PreviewPanelShell.a11y.browser.test.tsxsrc/components/projectScriptEditor.browser.test.tsxsrc/components/projectScriptEditor.permissions.browser.test.tsxsrc/components/pullRequest/PullRequestCandidatePicker.browser.test.tsxsrc/components/pullRequest/PullRequestMarkdownEditor.browser.test.tsxsrc/components/pullRequest/usePullRequestFilesViewed.browser.test.tsxUnmigrated files: none.
router: falseuses:StyledDiffCodeView: worker lifecycle tests use a fake clock and do not navigate.useFileSaveCoordinator,usePermissionStatus, andusePullRequestFilesViewed: isolated hook probes use fake timers and do not navigate.The favicon fixture is a complete 1×1 GIF, so source failures are driven by the test and use the default router. Queries remain scoped to each screen container. The partial-batch refresh rerender is awaited by the test, and worker cleanup flushes pending timers before restoring spies.
The HEIC success assertion now waits for asynchronous Blob decoding to publish the converted image source. No product behavior changes, so screenshots are not applicable. This is confined to web test infrastructure; other clients, providers, wire contracts, and connection modes are unchanged.
Validation:
--reporter=verbose:t3code/require-disposable-render.git diff --checkpasses.Review follow-up validation: favicon test passed five consecutive browser runs with the default router; all seven files changed by the follow-up passed once. Touched-file lint and web typecheck pass.
Implementation: GPT-6.1 through the Codex harness.
🤖 Generated with Claude Code