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

Fix coupon apply button bug #296

Merged
merged 2 commits into from May 20, 2019
Merged

Fix coupon apply button bug #296

merged 2 commits into from May 20, 2019

Conversation

noisecapella
Copy link

Pre-Flight checklist

  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

Fixes #268

What's this PR do?

Fixes logic on frontend where the coupon code submitted and the one rendered in the text field were calculated differently.

How should this be manually tested?

Apply a coupon. Refresh the page. Click the "Apply" button next to the coupon code. Nothing should appear to change. If you look in the network tab you should see a successful PATCH to the basket with the coupon code. On master you would see the coupon being removed from the basket, which is incorrect.

@odlbot odlbot temporarily deployed to xpro-ci-pr-296 May 16, 2019 14:42 Inactive
@noisecapella noisecapella temporarily deployed to xpro-ci-pr-296 May 16, 2019 14:43 Inactive
@codecov-io
Copy link

codecov-io commented May 16, 2019

Codecov Report

Merging #296 into master will decrease coverage by 0.01%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
- Coverage   94.12%   94.11%   -0.02%     
==========================================
  Files         160      160              
  Lines        5400     5418      +18     
  Branches      312      312              
==========================================
+ Hits         5083     5099      +16     
- Misses        261      263       +2     
  Partials       56       56
Impacted Files Coverage Δ
static/js/containers/pages/CheckoutPage_test.js 100% <100%> (ø) ⬆️
static/js/containers/pages/CheckoutPage.js 96.05% <86.66%> (-2.5%) ⬇️

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 08d7574...414ba0f. Read the comment docs.

@noisecapella noisecapella temporarily deployed to xpro-ci-pr-296 May 16, 2019 14:50 Inactive
@noisecapella noisecapella temporarily deployed to xpro-ci-pr-296 May 16, 2019 15:25 Inactive
@mbertrand mbertrand self-assigned this May 17, 2019
Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

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

Works as described but I noticed an issue when I have an "auto" coupon that is valid for the product in my basket. If I clear out the coupon code and click "Apply", the auto coupon is added to the basket and applied to the price, but does not show up in the coupon input field, unless I refresh the page:

Screen Shot 2019-05-17 at 1 16 16 PM

@noisecapella
Copy link
Author

Ah, good catch. I'll investigate.

@noisecapella
Copy link
Author

I think that should fix it

Copy link
Member

@mbertrand mbertrand left a comment

Choose a reason for hiding this comment

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

👍

@noisecapella noisecapella merged commit ee99523 into master May 20, 2019
@noisecapella noisecapella deleted the gs/coupon_update branch May 20, 2019 18:41
@odlbot odlbot mentioned this pull request May 22, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coupon code textbox on checkout page not submitting properly
4 participants