fix: stabilize all test suites after v14 breaking changes#3039
Open
fix: stabilize all test suites after v14 breaking changes#3039
Conversation
Replace barrel imports from MessageComposer with direct file imports to break circular dependency chains (MessageComposer → MediaRecorder → MessageComposer). Add missing React imports in Alert.tsx and QuotedMessageIndicator.tsx. Restore Preview prop on ChannelListItem lost during rename. Add JSDoc warning to useDebouncedTypingActive about the user?.id requirement. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Size Change: +613 B (+0.14%) Total Size: 441 kB
ℹ️ View Unchanged
|
8bfce44 to
ed20417
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3039 +/- ##
==========================================
+ Coverage 80.05% 80.26% +0.21%
==========================================
Files 511 561 +50
Lines 10803 13107 +2304
Branches 2711 3417 +706
==========================================
+ Hits 8648 10520 +1872
- Misses 1902 1922 +20
- Partials 253 665 +412 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Update 67 test suites (506 tests) to match v14 implementation changes: - Avatar: rename image→imageUrl, name→userName, add required size prop - Message: remove editing from context, update handleDelete signature, rename MessageDeleted→MessageDeletedBubble - MessageComposer: update cooldown API, fix SendButton queries, update quote action text - Reactions: rewrite for new dialog-based ReactionSelector/MessageReactions - ChannelList: update for new Search component, fix mobile nav viewport - Components: add missing context providers (DialogManager, ChatView) - Snapshots: regenerate stale external snapshots, replace Prettier-3 incompatible inline snapshots with structural assertions - TypingIndicator: fix test data (user must be object with id, not string) - Fix all lint warnings (unused vars, sort-keys, require-await, sort-imports) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ed20417 to
7735ab4
Compare
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
Previewprop onChannelListItemuseDebouncedTypingActiveaboutuser?.idrequirementEventEmitterMockandMediaRecorderMockto support realistic event dispatchTest plan
yarn jest --watchAll=false --no-coverage --testPathPattern="src/"— 142/142 suites pass, 1977/1977 tests green, 0 skippedyarn lint-fixpasses (all lint errors resolved)yarn types— verify TypeScript still compilesyarn build— verify production buildCategories of test fixes
<Chat>or<DialogManagerProvider>wrappersimage→imageUrl,name→userName, addedsizeReactionsList→MessageReactions,MessageDeleted→MessageDeletedBubble, etc.editing, updatedhandleDeletesignature, cooldown API migration.snapfiles, replaced inline snapshots with structural assertionsuseChatViewContext,useThreadContext,deleteDraftmocksEventEmitterMockto store/dispatch events andMediaRecorderMockto simulatestop()→dataavailableflowProduction code changes
Dialog/Alert.tsx,MessageComposer/QuotedMessageIndicator.tsximport ReactChannelListItem/ChannelListItem.tsxPreviewprop lost during renameTypingIndicator/hooks/useDebouncedTypingActive.tsuser?.idrequirementMock infrastructure improvements
mock-builders/browser/EventEmitter.jsemit()for realistic event dispatchmock-builders/browser/MediaRecorder.jsstatetransitions;autoEmitDataOnStopstatic flag simulates browser'sstop()→dataavailableflow for integration testsKnown follow-up
useMessageComposerController()instead of reading the controller from context — ideally the controller should be exposed viaMessageComposerContext🤖 Generated with Claude Code