-
Notifications
You must be signed in to change notification settings - Fork 39
New arch/unit tests #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: new-arch/master
Are you sure you want to change the base?
New arch/unit tests #703
Conversation
… files in src directory
…te changes and listener cleanup
…ation detection and updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a new architecture for the Iterable React Native SDK with comprehensive unit tests. The changes include adding testIDs to inbox components for better testing infrastructure and setting up TurboModule support for React Native's New Architecture.
- Added testIDs to all major inbox UI components for automated testing
- Implemented comprehensive unit tests for core inbox components and hooks
- Created new architecture support with TurboModule integration
Reviewed Changes
Copilot reviewed 41 out of 44 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/inbox/components/*.tsx | Added testIDs to inbox components for testing infrastructure |
src/inbox/components/*.test.tsx | Added comprehensive unit tests for inbox components |
src/core/hooks/*.test.tsx | Added unit tests for device orientation and app state hooks |
src/core/classes/Iterable.ts | Updated type signatures for null safety and added new architecture support |
src/api/* | Added new API layer with TurboModule support |
ios/RNIterableAPI/* | Updated iOS implementation for new architecture compatibility |
android/src/* | Added Android new/old architecture separation |
package.json | Updated dependencies for React Navigation and testing libraries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
{emptyStateTitle ? emptyStateTitle : defaultTitle} | ||
</Text> | ||
<Text style={styles.body}> | ||
<Text testID={inboxEmptyStateTestIDs.body} style={styles.body}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before style
attribute. Should be testID={inboxEmptyStateTestIDs.body} style={styles.body}
.
Copilot uses AI. Check for mistakes.
}, | ||
}) | ||
).current; | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing .current
accessor. The panResponder
is created with useRef()
, so it should be accessed as panResponder.current
when getting the panHandlers.
Copilot uses AI. Check for mistakes.
testID={inboxMessageCellTestIDs.selectButton} | ||
activeOpacity={1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation. The testID
should be aligned with the other props on the same indentation level as activeOpacity
.
Copilot uses AI. Check for mistakes.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary blank lines. Remove the extra empty lines.
Copilot uses AI. Check for mistakes.
❌ 5 blocking issues (6 total)
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
@@ -1,8 +1,8 @@ | |||
import { NativeEventEmitter } from 'react-native'; | |||
import { NativeEventEmitter, Platform } from 'react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,184 @@ | |||
import { renderHook, act } from '@testing-library/react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,424 @@ | |||
import { renderHook, act } from '@testing-library/react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,768 @@ | |||
import { render, waitFor } from '@testing-library/react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,647 @@ | |||
import { render, fireEvent } from '@testing-library/react-native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will increase coverage by 31.6%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
🔹 JIRA Ticket(s) if any
✏️ Description