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

CIF-1533 - [React components] The "add to cart" mutation uses a string instead of a float #351

Merged
merged 2 commits into from
Jul 30, 2020

Conversation

dplaton
Copy link
Contributor

@dplaton dplaton commented Jul 27, 2020

Description

Convert the item quantity explicitly to a float before sending the query.

Other trivial things:

  • remove an unused debug function from a test
  • name the Add to cart mutation to show up nicely in Apollo DevTools

Related Issue

CIF-1533

Motivation and Context

Fix the incompatibility between our React component and the graphql schema.

How Has This Been Tested?

Functional testing

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 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 and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

…g instead of a float

Convert the item quantity explicitly to a `float` before sending the query.

Other trivial things:
* remove an unused `debug` function from a test
* name the `Add to cart` mutation to show up nicely in Apollo DevTools
@codecov
Copy link

codecov bot commented Jul 27, 2020

Codecov Report

Merging #351 into master will increase coverage by 0.54%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #351      +/-   ##
============================================
+ Coverage     66.13%   66.67%   +0.54%     
  Complexity      852      852              
============================================
  Files           192      192              
  Lines          5843     5845       +2     
  Branches        912      912              
============================================
+ Hits           3864     3897      +33     
+ Misses         1853     1822      -31     
  Partials        126      126              
Flag Coverage Δ Complexity Δ
#integration 66.86% <ø> (ø) 628.00 <ø> (ø)
#jest 45.70% <100.00%> (+1.08%) 0.00 <0.00> (ø)
#karma 93.93% <ø> (ø) 0.00 <ø> (ø)
#unittests 85.81% <ø> (ø) 821.00 <ø> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...omponents/src/queries/mutation_add_to_cart.graphql 61.53% <ø> (+49.03%) 0.00 <0.00> (ø)
...-components/src/components/Minicart/useMinicart.js 96.15% <100.00%> (+0.15%) 0.00 <0.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 79e7a5b...bde383e. Read the comment docs.

@mhaack mhaack added the bug Something isn't working label Jul 30, 2020
@mhaack mhaack merged commit 909e24b into master Jul 30, 2020
@mhaack mhaack deleted the bugs/CIF-1533 branch July 30, 2020 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants