magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 155 forks source link

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only #1032

Closed TomashKhamlai closed 4 years ago

TomashKhamlai commented 5 years ago

Preconditions (*)

  1. No preconditions

Steps to reproduce (*)

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only

  1. Navigate to Store -> Settings -> Configuration -> General -> General -> State Options
  2. Find United States on the list. Press <Ctrl> or <Cmd> and remove the United States from the selection.
  3. Change value for the Allow to Choose State if It is Optional for Country option to No and save the configuration.
  4. Flush cache
  5. Perform mutation as a Customer
    mutation {
    createCustomerAddress(
    input: {
      country_code: US
      firstname: "John"
      lastname: "Doe"
      city: "Culver City"
      region: {
        region_code: "CA"
        region_id: 12
        region: "California"
      }
      street: [
        "6161 West Centinella Avenue"
      ]
      postcode: "90230"
      telephone: "+1 555 555 5555"
      default_billing: true
      default_shipping: true
    }
    ) {
    country_code
    firstname
    lastname
    city
    region {
      region
      region_code
    }
    street
    postcode
    telephone
    default_billing
    default_shipping
    }
    }

    Expected result: :heavy_check_mark: validation or region ignorance

Actual result: :x: Region is present in the address image

TomashKhamlai commented 5 years ago

@lenaorobei, please confirm or modify expectations.

lenaorobei commented 5 years ago

@TomashKhamlai please check latest 2.3-develop. This issue should be fixed.

TomashKhamlai commented 5 years ago

@lenaorobei, case 3 is still reproducible image