-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Purchases: Fix purchase not updated upon privacy protection cancelation #555
Conversation
This is still in progress because of a discrepancy between purchases returned by the |
assert( find( PurchasesStore.get().data, { id: 2 } ) ); | ||
assert( find( PurchasesStore.get().data, { id: 3 } ) ); | ||
expect( PurchasesStore.get() ).to.be.eql( { | ||
data: [ { id: 2 }, { id: 3 }, { id: 1 } ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does order matter here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, surprisingly it does :(.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now in code why it works this way. It's okey, because it's predictable.
Code looks good 👍 |
Yes, that's what I mentioned earlier. The purchase data returned by the |
I changed to In Progress, so far so good! :D |
b0dece3
to
d85efd8
Compare
This will be fixed by #699. Not sure if its worth continuing with this PR... |
This pull request is complete, we just need to fix the API to return the right data structure. |
d79d0d2
to
45b4b92
Compare
QA 👍 |
This checks the actual data structure of the store after fetching.
This better handles the case where an error is returned by the API.
This makes this action more consistent with other actions.
…el private registration action
Let's follow one naming convention and make this code simpler.
…th other stores This also formats a block of code and adds some blank lines - to help us breathe.
…n of private registration is successful This allows to update the Purchases store as soon as possible with up-to-date information (such as the correct price of the domain registration purchase) without resorting to fetching the list of updates.
45b4b92
to
b01894f
Compare
…ation Purchases: Fix purchase not updated upon privacy protection cancelation
This pull request fixes #189 by retrieving the domain registration purchase returned by the API when users cancel the associated private registration. The goal is to display the
Manage Purchase
page with up-to-date information as soon as the cancelation is successful:This pull request also fixes a small bug and refactor some code, mostly for consistency purposes.
Testing instructions
Scenario _#_1
Domains
pageAdd
button to add a domain to the shopping cartNo thanks, I don't need email or will use another provider.
link on the next pageDomain Registration Details
page and click on theAdd Privacy Protection
buttonSecure Payment
page with fake credit card informationPurchases
pageManage Purchase
pageCancel Private Registration
navigation linkCancel Private Registration
on the page of the same nameManage Purchase
page with a success message