Skip to content

Commit 124f3dc

Browse files
committed
PWA-1576: GQL gaps for Admin configuration
- update schema descriptions
1 parent b468123 commit 124f3dc

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

app/code/Magento/PaymentGraphQl/etc/graphql/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<item name="zero_subtotal_title" xsi:type="string">payment/free/title</item>
1414
<item name="zero_subtotal_new_order_status" xsi:type="string">payment/free/order_status</item>
1515
<item name="zero_subtotal_payment_action" xsi:type="string">payment/free/payment_action</item>
16-
<item name="zero_subtotal_payment_from_applicable_countries" xsi:type="string">payment/free/allowspecific</item>
16+
<item name="zero_subtotal_enable_for_specific_countries" xsi:type="string">payment/free/allowspecific</item>
1717
<item name="zero_subtotal_payment_from_specific_countries" xsi:type="string">payment/free/specificcountry</item>
1818
<item name="zero_subtotal_sort_order" xsi:type="string">payment/free/sort_order</item>
1919
<item name="check_money_order_enabled" xsi:type="string">payment/checkmo/active</item>
2020
<item name="check_money_order_title" xsi:type="string">payment/checkmo/title</item>
2121
<item name="check_money_order_new_order_status" xsi:type="string">payment/checkmo/order_status</item>
22-
<item name="check_money_order_payment_from_applicable_countries" xsi:type="string">payment/checkmo/allowspecific</item>
22+
<item name="check_money_order_enable_for_specific_countries" xsi:type="string">payment/checkmo/allowspecific</item>
2323
<item name="check_money_order_payment_from_specific_countries" xsi:type="string">payment/checkmo/specificcountry</item>
2424
<item name="check_money_order_make_check_payable_to" xsi:type="string">payment/checkmo/payable_to</item>
2525
<item name="check_money_order_send_check_to" xsi:type="string">payment/checkmo/mailing_address</item>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ type StoreConfig {
55
zero_subtotal_title: String @doc(description: "The title of the Zero Subtotal payment method displayed on the storefront")
66
zero_subtotal_new_order_status: String @doc(description: "Status of new orders placed using the Zero Subtotal payment method")
77
zero_subtotal_payment_action: String @doc(description: "When the new order status is 'Processing', this can be set to 'authorize_capture' to automatically invoice all items that have a zero balance")
8-
zero_subtotal_payment_from_applicable_countries: String @doc(description: "States whether All Allowed Countries or Specific Countries can use the Zero Subtotal payment method")
8+
zero_subtotal_enable_for_specific_countries: Boolean @doc(description: "Indicates whether only specific countries can use this payment method")
99
zero_subtotal_payment_from_specific_countries: String @doc(description: "Comma-separated list of specific countries allowed to use the Zero Subtotal payment method")
1010
zero_subtotal_sort_order: Int @doc(description: "A number indicating the position of the Zero Subtotal payment method in the list of available payment methods during checkout")
1111
check_money_order_enabled: Boolean @doc(description: "Indicates whether the Check/Money Order payment method is enabled")
1212
check_money_order_title: String @doc(description: "The title of the Check/Money Order payment method displayed on the storefront")
1313
check_money_order_new_order_status: String @doc(description: "Status of new orders placed using the Check/Money Order payment method")
14-
check_money_order_payment_from_applicable_countries: String @doc(description: "States whether All Allowed Countries or Specific Countries can use the Check/Money Order payment method")
14+
check_money_order_enable_for_specific_countries: Boolean @doc(description: "Indicates whether only specific countries can use this payment method")
1515
check_money_order_payment_from_specific_countries: String @doc(description: "Comma-separated list of specific countries allowed to use the Check/Money Order payment method")
1616
check_money_order_make_check_payable_to: String @doc(description: "The name of the party to whom the check must be payable")
1717
check_money_order_send_check_to: String @doc(description: "The full street address or PO Box where the checks are mailed")

dev/tests/api-functional/testsuite/Magento/GraphQl/PaymentGraphQl/StoreConfigTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class StoreConfigTest extends GraphQlAbstract
2323
zero_subtotal_title
2424
zero_subtotal_new_order_status
2525
zero_subtotal_payment_action
26-
zero_subtotal_payment_from_applicable_countries
26+
zero_subtotal_enable_for_specific_countries
2727
zero_subtotal_payment_from_specific_countries
2828
zero_subtotal_sort_order
2929
check_money_order_enabled
3030
check_money_order_title
3131
check_money_order_new_order_status
32-
check_money_order_payment_from_applicable_countries
32+
check_money_order_enable_for_specific_countries
3333
check_money_order_payment_from_specific_countries
3434
check_money_order_make_check_payable_to
3535
check_money_order_send_check_to
@@ -52,13 +52,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderDefaultValues()
5252
self::assertArrayHasKey('zero_subtotal_title', $response['storeConfig']);
5353
self::assertArrayHasKey('zero_subtotal_new_order_status', $response['storeConfig']);
5454
self::assertArrayHasKey('zero_subtotal_payment_action', $response['storeConfig']);
55-
self::assertArrayHasKey('zero_subtotal_payment_from_applicable_countries', $response['storeConfig']);
55+
self::assertArrayHasKey('zero_subtotal_enable_for_specific_countries', $response['storeConfig']);
5656
self::assertArrayHasKey('zero_subtotal_payment_from_specific_countries', $response['storeConfig']);
5757
self::assertArrayHasKey('zero_subtotal_sort_order', $response['storeConfig']);
5858
self::assertArrayHasKey('check_money_order_enabled', $response['storeConfig']);
5959
self::assertArrayHasKey('check_money_order_title', $response['storeConfig']);
6060
self::assertArrayHasKey('check_money_order_new_order_status', $response['storeConfig']);
61-
self::assertArrayHasKey('check_money_order_payment_from_applicable_countries', $response['storeConfig']);
61+
self::assertArrayHasKey('check_money_order_enable_for_specific_countries', $response['storeConfig']);
6262
self::assertArrayHasKey('check_money_order_payment_from_specific_countries', $response['storeConfig']);
6363
self::assertArrayHasKey('check_money_order_make_check_payable_to', $response['storeConfig']);
6464
self::assertArrayHasKey('check_money_order_send_check_to', $response['storeConfig']);
@@ -70,13 +70,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderDefaultValues()
7070
self::assertEquals('No Payment Information Required', $response['storeConfig']['zero_subtotal_title']);
7171
self::assertEquals('pending', $response['storeConfig']['zero_subtotal_new_order_status']);
7272
self::assertEquals('authorize_capture', $response['storeConfig']['zero_subtotal_payment_action']);
73-
self::assertEquals('0', $response['storeConfig']['zero_subtotal_payment_from_applicable_countries']);
73+
self::assertFalse($response['storeConfig']['zero_subtotal_enable_for_specific_countries']);
7474
self::assertNull($response['storeConfig']['zero_subtotal_payment_from_specific_countries']);
7575
self::assertEquals(1, $response['storeConfig']['zero_subtotal_sort_order']);
7676
self::assertTrue($response['storeConfig']['check_money_order_enabled']);
7777
self::assertEquals('Check / Money order', $response['storeConfig']['check_money_order_title']);
7878
self::assertEquals('pending', $response['storeConfig']['check_money_order_new_order_status']);
79-
self::assertEquals('0', $response['storeConfig']['check_money_order_payment_from_applicable_countries']);
79+
self::assertFalse($response['storeConfig']['check_money_order_enable_for_specific_countries']);
8080
self::assertNull($response['storeConfig']['check_money_order_payment_from_specific_countries']);
8181
self::assertNull($response['storeConfig']['check_money_order_make_check_payable_to']);
8282
self::assertNull($response['storeConfig']['check_money_order_send_check_to']);
@@ -100,13 +100,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderDisabled()
100100
self::assertArrayHasKey('zero_subtotal_title', $response['storeConfig']);
101101
self::assertArrayHasKey('zero_subtotal_new_order_status', $response['storeConfig']);
102102
self::assertArrayHasKey('zero_subtotal_payment_action', $response['storeConfig']);
103-
self::assertArrayHasKey('zero_subtotal_payment_from_applicable_countries', $response['storeConfig']);
103+
self::assertArrayHasKey('zero_subtotal_enable_for_specific_countries', $response['storeConfig']);
104104
self::assertArrayHasKey('zero_subtotal_payment_from_specific_countries', $response['storeConfig']);
105105
self::assertArrayHasKey('zero_subtotal_sort_order', $response['storeConfig']);
106106
self::assertArrayHasKey('check_money_order_enabled', $response['storeConfig']);
107107
self::assertArrayHasKey('check_money_order_title', $response['storeConfig']);
108108
self::assertArrayHasKey('check_money_order_new_order_status', $response['storeConfig']);
109-
self::assertArrayHasKey('check_money_order_payment_from_applicable_countries', $response['storeConfig']);
109+
self::assertArrayHasKey('check_money_order_enable_for_specific_countries', $response['storeConfig']);
110110
self::assertArrayHasKey('check_money_order_payment_from_specific_countries', $response['storeConfig']);
111111
self::assertArrayHasKey('check_money_order_make_check_payable_to', $response['storeConfig']);
112112
self::assertArrayHasKey('check_money_order_send_check_to', $response['storeConfig']);
@@ -118,13 +118,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderDisabled()
118118
self::assertEquals('No Payment Information Required', $response['storeConfig']['zero_subtotal_title']);
119119
self::assertEquals('pending', $response['storeConfig']['zero_subtotal_new_order_status']);
120120
self::assertEquals('authorize_capture', $response['storeConfig']['zero_subtotal_payment_action']);
121-
self::assertEquals('0', $response['storeConfig']['zero_subtotal_payment_from_applicable_countries']);
121+
self::assertFalse($response['storeConfig']['zero_subtotal_enable_for_specific_countries']);
122122
self::assertNull($response['storeConfig']['zero_subtotal_payment_from_specific_countries']);
123123
self::assertEquals(1, $response['storeConfig']['zero_subtotal_sort_order']);
124124
self::assertFalse($response['storeConfig']['check_money_order_enabled']);
125125
self::assertEquals('Check / Money order', $response['storeConfig']['check_money_order_title']);
126126
self::assertEquals('pending', $response['storeConfig']['check_money_order_new_order_status']);
127-
self::assertEquals('0', $response['storeConfig']['check_money_order_payment_from_applicable_countries']);
127+
self::assertFalse($response['storeConfig']['check_money_order_enable_for_specific_countries']);
128128
self::assertNull($response['storeConfig']['check_money_order_payment_from_specific_countries']);
129129
self::assertNull($response['storeConfig']['check_money_order_make_check_payable_to']);
130130
self::assertNull($response['storeConfig']['check_money_order_send_check_to']);
@@ -159,13 +159,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderCustom()
159159
self::assertArrayHasKey('zero_subtotal_title', $response['storeConfig']);
160160
self::assertArrayHasKey('zero_subtotal_new_order_status', $response['storeConfig']);
161161
self::assertArrayHasKey('zero_subtotal_payment_action', $response['storeConfig']);
162-
self::assertArrayHasKey('zero_subtotal_payment_from_applicable_countries', $response['storeConfig']);
162+
self::assertArrayHasKey('zero_subtotal_enable_for_specific_countries', $response['storeConfig']);
163163
self::assertArrayHasKey('zero_subtotal_payment_from_specific_countries', $response['storeConfig']);
164164
self::assertArrayHasKey('zero_subtotal_sort_order', $response['storeConfig']);
165165
self::assertArrayHasKey('check_money_order_enabled', $response['storeConfig']);
166166
self::assertArrayHasKey('check_money_order_title', $response['storeConfig']);
167167
self::assertArrayHasKey('check_money_order_new_order_status', $response['storeConfig']);
168-
self::assertArrayHasKey('check_money_order_payment_from_applicable_countries', $response['storeConfig']);
168+
self::assertArrayHasKey('check_money_order_enable_for_specific_countries', $response['storeConfig']);
169169
self::assertArrayHasKey('check_money_order_payment_from_specific_countries', $response['storeConfig']);
170170
self::assertArrayHasKey('check_money_order_make_check_payable_to', $response['storeConfig']);
171171
self::assertArrayHasKey('check_money_order_send_check_to', $response['storeConfig']);
@@ -177,13 +177,13 @@ public function testStoreConfigZeroSubtotalCheckMoneyOrderCustom()
177177
self::assertEquals('Test Zero Subtotal Title', $response['storeConfig']['zero_subtotal_title']);
178178
self::assertEquals('processing', $response['storeConfig']['zero_subtotal_new_order_status']);
179179
self::assertEquals('authorize_capture', $response['storeConfig']['zero_subtotal_payment_action']);
180-
self::assertEquals('1', $response['storeConfig']['zero_subtotal_payment_from_applicable_countries']);
180+
self::assertTrue($response['storeConfig']['zero_subtotal_enable_for_specific_countries']);
181181
self::assertEquals('DZ', $response['storeConfig']['zero_subtotal_payment_from_specific_countries']);
182182
self::assertEquals(5, $response['storeConfig']['zero_subtotal_sort_order']);
183183
self::assertTrue($response['storeConfig']['check_money_order_enabled']);
184184
self::assertEquals('Test Check / Money Order Title', $response['storeConfig']['check_money_order_title']);
185185
self::assertEquals('pending', $response['storeConfig']['check_money_order_new_order_status']);
186-
self::assertEquals('1', $response['storeConfig']['check_money_order_payment_from_applicable_countries']);
186+
self::assertTrue($response['storeConfig']['check_money_order_enable_for_specific_countries']);
187187
self::assertEquals('BR', $response['storeConfig']['check_money_order_payment_from_specific_countries']);
188188
self::assertEquals('Test Payee', $response['storeConfig']['check_money_order_make_check_payable_to']);
189189
self::assertEquals('Test Address', $response['storeConfig']['check_money_order_send_check_to']);

0 commit comments

Comments
 (0)