io-app
io-app copied to clipboard
chore: [IOCOM-1354] `NOTIFICATION_PERMISSION` super and profile property
⚠️ This PR depends on #5734 ⚠️
Short description
This PR adds the NOTIFICATION_PERMISSION: "enabled"/"disabled"
property to both super and profile properties.
It also refactors the checkNotificationsPreferencesSaga
to be more readable.
List of changes proposed in this pull request
-
ts/screens/profile/analytics/index.ts
: type and utility to convert from boolean to type -
ts/mixpanelConfig/profileProperties.ts
andts/mixpanelConfig/superProperties.ts
: property added with related code to compute its value -
ts/features/pushNotifications/sagas/checkNotificationsPreferencesSaga.ts
: code flow refactored to be more readable (with full tests) -
ts/features/pushNotifications/screen/OnboardingNotificationsInfoScreenConsent.ts
: modal dismissal moved to the saga above
How to test
Using the io-dev-api-server, check that:
- the analytics event value is read properly before and after the permission is given
- the original flow for the profile notification onboarding still works
- for an onboarded user, the permission popup is shown
Affected stories
- ⚙️ IOCOM-1354: [APP, Evento Mixpanel Push Spente] Implementazione
subtask of
- ⚡ IOCOM-1255: Avviso notifiche push spente
Generated by :no_entry_sign: dangerJS against 9f066280097c19f7a0c2339d98d4de3b2aab3243
Codecov Report
Attention: Patch coverage is 87.50000%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 49.62%. Comparing base (
4f204b4
) to head (9f06628
). Report is 99 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #5749 +/- ##
==========================================
+ Coverage 48.42% 49.62% +1.20%
==========================================
Files 1488 1624 +136
Lines 31617 32248 +631
Branches 7669 7792 +123
==========================================
+ Hits 15311 16004 +693
+ Misses 16238 16190 -48
+ Partials 68 54 -14
Files | Coverage Δ | |
---|---|---|
...cations/sagas/checkNotificationsPreferencesSaga.ts | 100.00% <100.00%> (ø) |
|
...reens/OnboardingNotificationsInfoScreenConsent.tsx | 90.00% <ø> (ø) |
|
ts/mixpanelConfig/profileProperties.ts | 29.16% <0.00%> (-1.27%) |
:arrow_down: |
ts/mixpanelConfig/superProperties.ts | 26.31% <0.00%> (-1.47%) |
:arrow_down: |
ts/screens/profile/analytics/index.ts | 25.00% <50.00%> (+1.00%) |
:arrow_up: |
... and 541 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 45d20bc...9f06628. Read the comment docs.
:tada: All dependencies have been resolved !