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

Checkout: Block removal of Private Registration from cart only when renewing #1540

Merged
merged 2 commits into from
Dec 17, 2015

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Dec 14, 2015

Fixes #1410.

Steps to reproduce:

  1. Go to http://calypso.localhost:3000/domains/manage.
  2. Select a Site.
  3. Select a Domain without Private Registration.
  4. Navigate to Contacts and Privacy page.
  5. Navigate to Privacy Protection page.
  6. Click Add Privacy Protection button.
  7. Checkout page will load and you won't be able to remove this upgrade from the cart (remove icon is missing):

Testing

  1. Do (1)-(6) from steps to reproduce.
  2. You should be able to remove Private Registration from the cart.
  3. Go to http://calypso.localhost:3000/purchases.
  4. Select a Domain purchase with Private Registration that is expiring.
  5. Click Renew button.
  6. You shouldn't be able to remove Private Registration from the cart. Domain needs to be renewed together with Private Registration.

@gziolo gziolo added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature Group] Emails & Domains Features related to email integrations and domain management. labels Dec 14, 2015
@gziolo gziolo self-assigned this Dec 14, 2015
@gziolo
Copy link
Member Author

gziolo commented Dec 14, 2015

@scruffian @fabianapsimoes: Can you confirm it doesn't break anything?

@@ -24,6 +24,18 @@ function applyCoupon( coupon ) {
};
}

function canRemoveFromCart( cart, cartItem ) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This function fits much better in cart related logic.

@gziolo gziolo force-pushed the fix/1410-remove-private-registration branch from 115ed5e to 051b6d4 Compare December 15, 2015 08:19
@drewblaisdell
Copy link
Contributor

This works properly and improves the quality of the code it touches. I tested both domain cases. LGTM.

@drewblaisdell drewblaisdell added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 17, 2015
@gziolo gziolo force-pushed the fix/1410-remove-private-registration branch from 051b6d4 to d2e5725 Compare December 17, 2015 07:26
gziolo added a commit that referenced this pull request Dec 17, 2015
…stration

Checkout: Block removal of Private Registration from cart only when renewing
@gziolo gziolo merged commit 4cb5e73 into master Dec 17, 2015
@gziolo gziolo deleted the fix/1410-remove-private-registration branch December 17, 2015 07:46
@gziolo
Copy link
Member Author

gziolo commented Dec 17, 2015

Thanks @drewblaisdell for review! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature Group] Emails & Domains Features related to email integrations and domain management. [Status] In Progress [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants