Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Save country when creating new quote addresses #390

Merged

Conversation

pmclain
Copy link
Contributor

@pmclain pmclain commented Feb 23, 2019

Description (*)

Properly set the country_id value on quote address objects created using the shipping and billing method mutations.

Fixed Issues (if relevant)

  1. Country Not Saved With New Quote Addresses #389: Country Not Saved With New Quote Addresses

Manual testing scenarios (*)

  1. Create empty cart
mutation {
  createEmptyCart
}
  1. Add new shipping address on cart
mutation SetShippingAddress($cartId:String!) {
  setShippingAddressesOnCart(input: {
    cart_id:$cartId
    shipping_addresses:[{
      address:{
        city:"Nowhere"
        country_code:"US"
        firstname:"Patrick"
        lastname:"McLain"
        postcode:"49920"
        region:"MI"
        save_in_address_book:false
        street:["123 Abc Ct"]
        telephone:"5555555555"
      }
    }]
  }) {
    cart {
      cart_id
      shipping_addresses {
        country {
          code
          label
        }
      }
    }
  }
}
  1. Set billing address on cart
mutation SetBillingAddress($cartId:String!) {
  setBillingAddressOnCart(input: {
    cart_id:$cartId
    billing_addresses:{
      address:{
        city:"Nowhere"
        country_code:"US"
        firstname:"Patrick"
        lastname:"McLain"
        postcode:"49920"
        region:"MI"
        save_in_address_book:false
        street:["123 Abc Ct"]
        telephone:"5555555555"
      }
    }
  }) {
    cart {
      cart_id
      billing_address {
        country {
          code
          label
        }
      }
    }
  }
}

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@ghost
Copy link

ghost commented Feb 26, 2019

Hi @pmclain, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants