-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add session replay assertions for internal testing #611
Add session replay assertions for internal testing #611
Conversation
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.
I didn't dig too much into TS/Swift code, but Kotlin part lgtm.
@@ -144,6 +144,12 @@ internal class ReactTextPropertiesResolver( | |||
} | |||
|
|||
private fun getTextColor(shadowNodeWrapper: ShadowNodeWrapper): String? { | |||
val isColorSet = shadowNodeWrapper | |||
.getDeclaredShadowNodeField(IS_COLOR_SET_FIELD_NAME) as Boolean? | |||
if (isColorSet != true) { |
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.
if it is not set, won't resolvedColor
below be null? if it is the case, we can probably simply return #000000FF
there directly, without querying another property here
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.
If it is not set resolvedColor
will actually return 0
. It will return null
if for some reason it cannot get access to the property through reflection
...d/src/test/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayImplementationTest.kt
Outdated
Show resolved
Hide resolved
bd349cb
to
caf333f
Compare
dc84f60
to
87bb011
Compare
What does this PR do?
Adds assertions for the Session Replay events.
For now we only assert on full snapshots, but that's enough to make sure the custom mappers we've added for RN session replay are working as intented.
For Android we had to add a bunch of improvements:
#0
instead of#000000FF
, so I fixed itMotivation
Being able to run UI-level tests to better cover the Session Replay feature.
Review checklist (to be filled by reviewers)