Skip to content
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

Feature/session-replay/compound-button-mappers #2120

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

ambushwork
Copy link
Member

What does this PR do?

Merge feature branch of session replay compound button and switch compat mapper into develop

Motivation

  • RUM-4718
  • RUM-4716
  • RUM-4715
  • RUM-4717

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork ambushwork requested review from a team as code owners July 3, 2024 13:33
asyncJobStatusCallback = eq(mockAsyncJobStatusCallback),
clipping = eq(MobileSegment.WireframeClip()),
shapeStyle = eq(null),
border = eq(null),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: occurrences of eq(null) can be replaced by isNull()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, updated

@@ -165,74 +211,22 @@ internal abstract class BaseSwitchCompatMapperTest : LegacyBaseWireframeMapperTe
assertThat(resolvedWireframes).isEqualTo(fakeTextWireframes)
}

@Test
@RepeatedTest(10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we repeating this test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because in the function forge generate random data, so I want to repeat the test so that it can cover maximum the case

import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever

@ForgeConfiguration(value = ForgeConfigurator::class, seed = 0x27e4b032201e5L)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we passing this seed value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was added by mistake, now removed

@@ -39,40 +54,23 @@ internal class SwitchCompatMapperTest : BaseSwitchCompatMapperTest() {
)
}

@Test
fun `M resolve the switch as wireframes W map() { checked }`() {
@RepeatedTest(8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we repeating this test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because in the function forge generate random data, so I want to repeat the test so that it can cover maximum the case

@ambushwork ambushwork requested a review from jonathanmos July 8, 2024 08:03
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 69.64286% with 51 lines in your changes missing coverage. Please review.

Project coverage is 69.46%. Comparing base (d2a5741) to head (747a877).
Report is 25 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2120      +/-   ##
===========================================
- Coverage    69.84%   69.46%   -0.38%     
===========================================
  Files          715      715              
  Lines        26577    26588      +11     
  Branches      4457     4468      +11     
===========================================
- Hits         18561    18467      -94     
- Misses        6821     6895      +74     
- Partials      1195     1226      +31     
Files Coverage Δ
.../sessionreplay/internal/DefaultRecorderProvider.kt 93.16% <100.00%> (+0.12%) ⬆️
...nreplay/internal/recorder/mapper/CheckBoxMapper.kt 100.00% <100.00%> (ø)
...ternal/recorder/mapper/CheckableWireframeMapper.kt 100.00% <100.00%> (ø)
...play/internal/recorder/mapper/RadioButtonMapper.kt 66.67% <100.00%> (-33.33%) ⬇️
...roid/sessionreplay/internal/utils/DrawableUtils.kt 93.75% <50.00%> (-1.49%) ⬇️
...nternal/recorder/mapper/CheckableTextViewMapper.kt 59.26% <91.30%> (-37.29%) ⬇️
.../internal/recorder/mapper/CheckedTextViewMapper.kt 78.12% <55.56%> (-17.53%) ⬇️
...lay/internal/recorder/mapper/SwitchCompatMapper.kt 92.31% <89.74%> (+2.39%) ⬆️
...l/recorder/mapper/CheckableCompoundButtonMapper.kt 37.93% <23.40%> (-56.81%) ⬇️

... and 25 files with indirect coverage changes

@ambushwork ambushwork merged commit 76c4d8b into develop Jul 8, 2024
19 checks passed
@ambushwork ambushwork deleted the feature/session-replay/compound-button-mappers branch July 8, 2024 09:20
@xgouchet xgouchet added this to the 2.12.x milestone Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants