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

chore: [#174596045] Change api call from getProfile to getSession #2201

Merged
merged 7 commits into from
Sep 21, 2020

Conversation

CrisTofani
Copy link
Contributor

Short description

This PR replaces the getProfile with getSession on checkSessionSaga

@pagopa-github-bot pagopa-github-bot changed the title [#174596045] Change api call from getProfile to getSession chore: [#174596045] Change api call from getProfile to getSession Sep 15, 2020
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Sep 15, 2020

Affected stories

  • ⚙️ #174596045: Sostituire la getProfile con la getSession nella checkSession saga

Generated by 🚫 dangerJS against 5959463

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2020

Codecov Report

Merging #2201 into master will increase coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2201      +/-   ##
==========================================
+ Coverage   47.15%   47.17%   +0.01%     
==========================================
  Files         493      492       -1     
  Lines       14844    14762      -82     
  Branches     2779     2767      -12     
==========================================
- Hits         7000     6964      -36     
+ Misses       7802     7756      -46     
  Partials       42       42              
Impacted Files Coverage Δ
ts/sagas/startup.ts 58.77% <0.00%> (ø)
ts/sagas/startup/watchCheckSessionSaga.ts 85.71% <100.00%> (+1.09%) ⬆️
ts/components/ui/Markdown/handlers/internalLink.ts 76.92% <0.00%> (-1.13%) ⬇️
ts/store/reducers/authentication.ts 48.38% <0.00%> (-0.85%) ⬇️
ts/utils/webview.ts 90.00% <0.00%> (ø)
ts/navigation/routes.ts 100.00% <0.00%> (ø)
scripts/changelog/ts/changelog.ts 73.84% <0.00%> (ø)
ts/navigation/ServicesNavigator.ts 100.00% <0.00%> (ø)
ts/sagas/startup/checkProfileEnabledSaga.ts 100.00% <0.00%> (ø)
...onus/bonusVacanze/components/TosBonusComponent.tsx
... and 134 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c6dfbe...5959463. Read the comment docs.

Copy link
Contributor

@Undermaken Undermaken left a comment

Choose a reason for hiding this comment

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

I can't understand very well this approach.

In my mind this is should be something like this:

  • we use getProfile to check whenever the session is still valid
  • now we change getProfile with getSession (because we use composition in watchCheckSessionSaga)
  • different from before if the session is successfully loaded, dispatch the sessionInformationLoadSuccess action (to update the store)
  • add another iteration in the relative test (different from before we dispatch a new action in the OK path)

here my attempt 93d5091

In your code you added another task to loadSessionInformationSaga function: now it is responsible to load the session and to dispatch an action about the check session

@Undermaken Undermaken merged commit a46f228 into master Sep 21, 2020
@CrisTofani CrisTofani deleted the 174596045-check-session-api branch March 23, 2021 11:10
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