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

feat: 366 nnnnat address validation #421

Merged
merged 13 commits into from
Nov 19, 2018

Conversation

nnnnat
Copy link
Contributor

@nnnnat nnnnat commented Nov 7, 2018

Resolves #366
Impact: major
Type: feature

Issue

#366

Solution

Created a withAddressValidation Query container that provides Checkout with the addressValidation GQL query method as well as any validation results returned from the validation service.

Breaking changes

N/A

Testing

This PR requires Reaction 2.0.0-rc.7
Valid addresses

  1. As an Admin within Reaction, open the "Shop" panel and enable the "Test Validation".
  2. As a customer within the Starterkit add an item to the cart and start to check out as a guest.
  3. Enter a shipping address that has a postal code that starts with "9" (i.e., 90210).
  4. The address should return as valid and checkout should move to the next step.
  5. Complete checkout.

Invalid addresses

  1. As a customer within the Starterkit add an item to the cart and start to check out as a guest.
  2. Enter a shipping address that has a postal code that does not starts with "9" (i.e., 12345).
  3. The address should return as invalid and the AddressReview should display with a InlineAlert explaining the issue.
  4. Select the suggested address and submit, checkout should move to the next step.
  5. Complete checkout

Edit an invalid address

  1. As a customer within the Starterkit add an item to the cart and start to check out as a guest.
  2. Enter a shipping address that has a postal code that does not starts with "9" (i.e., 12345).
  3. The address should return as invalid and the AddressReview should display with a InlineAlert explaining the issue.
  4. Click "Edit entered address", the UI should switch to the form with the entered address pre-populated.
  5. Change the postal code to start with a "9" and submit.
  6. The address should return as valid and the checkout should move to the next step.
  7. Complete checkout

Note: there is a small UI bug when you try to "Change" a set address, the InlineAlert will sometimes display empty, this is a bug within the component-lib and it being resolved in another PR

@nnnnat nnnnat added this to the Quandary milestone Nov 7, 2018
@nnnnat nnnnat self-assigned this Nov 7, 2018
@nnnnat nnnnat changed the title [WIP] feat: 366 nnnnat address validation feat: 366 nnnnat address validation Nov 19, 2018
@machikoyasuda
Copy link
Contributor

machikoyasuda commented Nov 19, 2018

1 and 2 LGTM so far.

I had to restart reaction container with the new branch to get the copy:

1:
screen shot 2018-11-19 at 11 48 30 am

2:
screen shot 2018-11-19 at 11 47 05 am

3:
screen shot 2018-11-19 at 1 42 31 pm

Copy link
Contributor

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

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

LGTM

@machikoyasuda machikoyasuda merged commit f5d3443 into develop Nov 19, 2018
@machikoyasuda machikoyasuda deleted the feat-366-nnnnat-address-validation branch November 19, 2018 21:54
This was referenced Jan 15, 2019
@spencern spencern mentioned this pull request Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement address validation.
2 participants