Skip to content

Commit 27bc500

Browse files
committed
GraphQL-293: [Payment methods] Set Payment Method on Cart
-- Fixes after merge with mainline
1 parent cfbd185 commit 27bc500

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ public function testSetBillingAddressFromAddressBook()
205205
city
206206
postcode
207207
telephone
208+
country {
209+
code
210+
label
211+
}
208212
}
209213
}
210214
}
@@ -410,7 +414,8 @@ private function assertNewAddressFields(array $billingAddressResponse): void
410414
['response_field' => 'street', 'expected_value' => [0 => 'test street 1', 1 => 'test street 2']],
411415
['response_field' => 'city', 'expected_value' => 'test city'],
412416
['response_field' => 'postcode', 'expected_value' => '887766'],
413-
['response_field' => 'telephone', 'expected_value' => '88776655']
417+
['response_field' => 'telephone', 'expected_value' => '88776655'],
418+
['response_field' => 'country', 'expected_value' => ['code' => 'US', 'label' => 'US']],
414419
];
415420

416421
$this->assertResponseFields($billingAddressResponse, $assertionMap);
@@ -430,7 +435,8 @@ private function assertSavedBillingAddressFields(array $billingAddressResponse):
430435
['response_field' => 'street', 'expected_value' => [0 => 'Green str, 67']],
431436
['response_field' => 'city', 'expected_value' => 'CityM'],
432437
['response_field' => 'postcode', 'expected_value' => '75477'],
433-
['response_field' => 'telephone', 'expected_value' => '3468676']
438+
['response_field' => 'telephone', 'expected_value' => '3468676'],
439+
['response_field' => 'country', 'expected_value' => ['code' => 'US', 'label' => 'US']],
434440
];
435441

436442
$this->assertResponseFields($billingAddressResponse, $assertionMap);

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ public function testSetNewBillingAddress()
7878
city
7979
postcode
8080
telephone
81+
country {
82+
code
83+
label
84+
}
8185
}
8286
}
8387
}
@@ -130,6 +134,10 @@ public function testSetNewBillingAddressWithUseForShippingParameter()
130134
city
131135
postcode
132136
telephone
137+
country {
138+
code
139+
label
140+
}
133141
}
134142
shipping_addresses {
135143
firstname
@@ -139,6 +147,10 @@ public function testSetNewBillingAddressWithUseForShippingParameter()
139147
city
140148
postcode
141149
telephone
150+
country {
151+
code
152+
label
153+
}
142154
}
143155
}
144156
}
@@ -243,7 +255,8 @@ private function assertNewAddressFields(array $billingAddressResponse): void
243255
['response_field' => 'street', 'expected_value' => [0 => 'test street 1', 1 => 'test street 2']],
244256
['response_field' => 'city', 'expected_value' => 'test city'],
245257
['response_field' => 'postcode', 'expected_value' => '887766'],
246-
['response_field' => 'telephone', 'expected_value' => '88776655']
258+
['response_field' => 'telephone', 'expected_value' => '88776655'],
259+
['response_field' => 'country', 'expected_value' => ['code' => 'US', 'label' => 'US']],
247260
];
248261

249262
$this->assertResponseFields($billingAddressResponse, $assertionMap);

0 commit comments

Comments
 (0)