[Cart Operations] Silently failed to set address on cart
TomashKhamlai opened this issue · 1 comments
TomashKhamlai commented
Preconditions (*)
- The customer has an active cart
Steps to reproduce (*)
- Set shipping address without
street
parameter
mutation shipping(
$cart_id: String!
) {
setShippingAddressesOnCart(
input: {
cart_id: $cart_id
shipping_addresses: {
address: {
firstname: "Joe"
country_code: "MX"
street: [
""
]
}
}
}
) {
cart {
shipping_addresses {
firstname
postcode
}
}
}
}
- Get address from cart
{
cart(cart_id: "12345678123456781234567812345678") {
shipping_addresses {
telephone
street
region {
code
label
}
postcode
lastname
firstname
}
}
}
Expected result (*)
"message": "The address failed to save. Verify the address and try again."
Actual result (*)
- Success response but
{
"data": {
"cart": {
"shipping_addresses": []
}
}
}
lenaorobei commented
Hi @TomashKhamlai. The schema looks following:
input CartAddressInput {
firstname: String!
lastname: String!
company: String
street: [String!]!
city: String!
region: String
postcode: String
country_code: String!
telephone: String!
save_in_address_book: Boolean
}
street
is required input parameter and the case that validation does not properly happening shows that it is a framework bug. Such validation should not happen in resolvers and such test cases are redundant.
Closing this PR since the framework bug is assigned to the internal team.