Skip to content

Conversation

@jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Nov 20, 2025

Description

One Line Summary

Add more tests for InAppMessagesManager and LocationManager to improve test coverage.

Production Code Change

All usages of Build.VERSION.SDK_INT in LocationManager.kt have been refactored to use AndroidUtils.androidSDKInt for better flexibility when mocking the Android API level in tests.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@jinliu9508 jinliu9508 added the WIP Work In Progress label Nov 20, 2025
@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch from 1eedd1d to 56b0d62 Compare November 21, 2025 19:51
@jinliu9508 jinliu9508 changed the title add more tests for InAppMessageManager tests: more tests for InAppMessagesManager and LocationManager Nov 21, 2025
@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch 5 times, most recently from 6ac301e to b4a7360 Compare November 24, 2025 16:24
@jinliu9508 jinliu9508 removed the WIP Work In Progress label Nov 24, 2025
@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch from 8b72576 to 288325e Compare November 25, 2025 18:41
@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch 2 times, most recently from 5d5c256 to a9b001c Compare November 25, 2025 20:53
@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch from a9b001c to c875f72 Compare November 25, 2025 21:27
Copy link
Contributor Author

@jinliu9508 jinliu9508 left a comment

Choose a reason for hiding this comment

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

#2416 (comment)
triggerModelSlots is a list of TriggerModel captured when add() is called by the triggerModelStore so we can't directly compare with a list of maps. I updated a new version for better readability.

@jinliu9508 jinliu9508 force-pushed the add-test-in-app-message branch from 6495fd3 to 47ba05b Compare November 26, 2025 22:42
@jinliu9508
Copy link
Contributor Author

CI fails due to a flaky test in StartupService. Will address it in a separate PR.

@jinliu9508 jinliu9508 merged commit fb0fc32 into main Nov 27, 2025
0 of 5 checks passed
@jinliu9508 jinliu9508 deleted the add-test-in-app-message branch November 27, 2025 01:02
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