Skip to content

Commit 0b6099a

Browse files
committed
GraphQL-388: updateCustomer mutation doesn't update undefined fields
1 parent 8af73d8 commit 0b6099a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/code/Magento/CustomerGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ type Customer @doc(description: "Customer defines the customer name and address
9292
id: Int @doc(description: "The ID assigned to the customer")
9393
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")
9494
addresses: [CustomerAddress] @doc(description: "An array containing the customer's shipping and billing addresses")
95+
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
9596
}
9697

9798
type CustomerAddress @doc(description: "CustomerAddress contains detailed information about a customer's billing and shipping addresses"){

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/ChangeCustomerPasswordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testChangeWeakPassword()
9494
/**
9595
* @magentoApiDataFixture Magento/Customer/_files/customer.php
9696
* @expectedException \Exception
97-
* @expectedExceptionMessage The password doesn't match this account. Verify the password and try again.
97+
* @expectedExceptionMessage Invalid login or password.
9898
*/
9999
public function testChangePasswordIfPasswordIsInvalid()
100100
{

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testUpdateCustomer()
7070
taxvat: "{$newTaxVat}"
7171
email: "{$newEmail}"
7272
password: "{$currentPassword}"
73-
gender: "{$newGender}"
73+
gender: {$newGender}
7474
}
7575
) {
7676
customer {
@@ -82,6 +82,7 @@ public function testUpdateCustomer()
8282
dob
8383
taxvat
8484
email
85+
gender
8586
}
8687
}
8788
}
@@ -209,7 +210,7 @@ public function testUpdateEmailIfPasswordIsMissed()
209210
/**
210211
* @magentoApiDataFixture Magento/Customer/_files/customer.php
211212
* @expectedException \Exception
212-
* @expectedExceptionMessage The password doesn't match this account. Verify the password and try again.
213+
* @expectedExceptionMessage Invalid login or password.
213214
*/
214215
public function testUpdateEmailIfPasswordIsInvalid()
215216
{

0 commit comments

Comments
 (0)