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

Add Push to in-app unit tests #338

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

rymorale
Copy link
Contributor

@rymorale rymorale commented Feb 5, 2025

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -90,4 +90,9 @@ dependencies {
exclude(group = "com.adobe.marketing.mobile", module = "core")
}
androidTestImplementation(project(":messagingtestutils"))
// specify byte buddy version to fix compatibility issue with jdk 21
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this resolves a byte buddy specific issue with jdk 21 which was blocking tests from running from within android studio.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev-v3.3.0@601b21d). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-v3.3.0     #338   +/-   ##
=============================================
  Coverage              ?   82.44%           
  Complexity            ?      832           
=============================================
  Files                 ?       81           
  Lines                 ?     3873           
  Branches              ?      593           
=============================================
  Hits                  ?     3193           
  Misses                ?      489           
  Partials              ?      191           
Flag Coverage Δ
android-functional-tests 29.89% <50.00%> (?)
android-unit-tests 82.13% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"pushTracking.customAction",
messagingEvent.getEventData().get("eventType"));

Event pushToInappEvent = eventCaptor.getAllValues().get(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this even be dispatched if the updatePropositionsForSurfaces callback returns false?

assertEquals(true, messagingEvent.getEventData().get("applicationOpened"));
assertEquals("mockXdmData", messagingEvent.getEventData().get("adobe_xdm"));
assertEquals(
"pushTracking.customAction",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we also verify that adb_iam_id exists in the payload?

@spoorthipujariadobe spoorthipujariadobe merged commit 4a82d53 into adobe:dev-v3.3.0 Feb 5, 2025
13 checks passed
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.

2 participants