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

use global apiservice in plannings request #606

Merged
merged 5 commits into from
Oct 28, 2020

Conversation

s-pic
Copy link
Collaborator

@s-pic s-pic commented Oct 23, 2020

What change does this add?

We start to use the centralized api client added in #370 by replacing the direct invocation of ky with the new servide.
Tests make sure the swap did not break anything.

Fixes #542
Fixes #541

How Has This Been Tested?

Run added unit tests

What workload does it derive?

What else is there to notice?

  • IMHO the TS types used in MapState.ts need some more love. For example we type MapState.planning as boolean, instead it contains an object containing the raw (?) api response

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #606 into develop will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #606      +/-   ##
===========================================
+ Coverage    25.85%   25.99%   +0.13%     
===========================================
  Files          374      374              
  Lines         7607     7609       +2     
  Branches      1899     1908       +9     
===========================================
+ Hits          1967     1978      +11     
+ Misses        5250     5241       -9     
  Partials       390      390              
Flag Coverage Δ
#unittests 25.99% <100.00%> (+0.13%) ⬆️

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

Impacted Files Coverage Δ
src/services/api/shorthands.ts 100.00% <ø> (ø)
src/apps/Map/MapState.ts 47.05% <100.00%> (+6.05%) ⬆️
src/services/api/index.ts 100.00% <0.00%> (+100.00%) ⬆️

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 3423b90...eb55f60. Read the comment docs.

src/apps/Map/MapState.ts Outdated Show resolved Hide resolved
src/apps/Map/MapState.unit.test.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@cafca cafca left a comment

Choose a reason for hiding this comment

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

perfect!

@cafca cafca merged commit 07b141e into develop Oct 28, 2020
@cafca cafca deleted the refactor/use_global_apiservice_in_plannings_request branch October 28, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants