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 device_type to Confirmed Delivery Request #850

Merged
merged 4 commits into from
Aug 11, 2021

Conversation

rgomezp
Copy link
Contributor

@rgomezp rgomezp commented Aug 10, 2021

Description

1 Line Summary

Providing this param will help in backend look-ups for outcome event reporting.

Details

See commits for further details

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

Tests

Info

Added testing coverage via nock to ensure we are sending the device_type on confirmed deliveries.

Includes some refactoring also related to nock.

Checklist

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

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed
    No screenshots necessary

Related Tickets



This change is Reviewable

Providing this param will help in backend look-ups for outcome event reporting.
These nock helpers are useful for inspecting the request payload for notification put requests.
Uses a nock to inspect the request body and check the device_type param
The `NockOneSignalHelper` class was introduced previously to contain all nock helper functions. We are updating these tests to use that class instead of ad-hoc nock functions in the test file.
@rgomezp rgomezp requested a review from jkasten2 August 10, 2021 23:46
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @rgomezp)

@rgomezp rgomezp merged commit 4b92725 into main Aug 11, 2021
@rgomezp rgomezp deleted the add_device_type_to_rr_req branch August 11, 2021 18:33
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