Skip to content

Commit b74802f

Browse files
sumesh-GLsvera
authored andcommitted
Merge pull request #184 from sumesh-GL/LYNX-303
LYNX-303: Added `max_items_in_order_summary` in storeConfig graphql query. Merging as PR is approved and all tests are green
1 parent d40629c commit b74802f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<argument name="extendedConfigData" xsi:type="array">
6666
<item name="is_guest_checkout_enabled" xsi:type="string">checkout/options/guest_checkout</item>
6767
<item name="is_one_page_checkout_enabled" xsi:type="string">checkout/options/onepage_checkout_enabled</item>
68+
<item name="max_items_in_order_summary" xsi:type="string">checkout/options/max_items_display_count</item>
6869
</argument>
6970
</arguments>
7071
</type>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,4 +445,5 @@ enum CartUserInputErrorType {
445445
type StoreConfig {
446446
is_guest_checkout_enabled: Boolean @doc(description: "Extended Config Data - checkout/options/guest_checkout")
447447
is_one_page_checkout_enabled: Boolean @doc(description: "Extended Config Data - checkout/options/onepage_checkout_enabled")
448+
max_items_in_order_summary: Int @doc(description: "Extended Config Data - checkout/options/max_items_display_count")
448449
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
*/
1818
class StoreConfigResolverTest extends GraphQlAbstract
1919
{
20+
private const MAX_ITEMS_TO_DISPLAY = 5;
21+
2022
#[
2123
ConfigFixture(Data::XML_PATH_GUEST_CHECKOUT, true, ScopeInterface::SCOPE_STORE, 'default'),
2224
ConfigFixture('checkout/options/onepage_checkout_enabled', true, ScopeInterface::SCOPE_STORE, 'default'),
25+
ConfigFixture('checkout/options/max_items_display_count', self::MAX_ITEMS_TO_DISPLAY)
2326
]
2427
public function testGetStoreConfig(): void
2528
{
@@ -29,6 +32,7 @@ public function testGetStoreConfig(): void
2932
storeConfig {
3033
is_guest_checkout_enabled,
3134
is_one_page_checkout_enabled,
35+
max_items_in_order_summary
3236
}
3337
}
3438
QUERY;
@@ -47,5 +51,6 @@ private function validateStoreConfig(
4751
): void {
4852
$this->assertTrue($responseConfig['is_guest_checkout_enabled']);
4953
$this->assertTrue($responseConfig['is_one_page_checkout_enabled']);
54+
$this->assertEquals(self::MAX_ITEMS_TO_DISPLAY, $responseConfig['max_items_in_order_summary']);
5055
}
5156
}

0 commit comments

Comments
 (0)