Skip to content

Commit

Permalink
Merge pull request #184 from sumesh-GL/LYNX-303
Browse files Browse the repository at this point in the history
LYNX-303: Added `max_items_in_order_summary` in storeConfig graphql query.
Merging as PR is approved and all tests are green
  • Loading branch information
sumesh-GL authored Dec 13, 2023
2 parents 821d884 + a567bc8 commit 80a353c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/QuoteGraphQl/etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<argument name="extendedConfigData" xsi:type="array">
<item name="is_guest_checkout_enabled" xsi:type="string">checkout/options/guest_checkout</item>
<item name="is_one_page_checkout_enabled" xsi:type="string">checkout/options/onepage_checkout_enabled</item>
<item name="max_items_in_order_summary" xsi:type="string">checkout/options/max_items_display_count</item>
</argument>
</arguments>
</type>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/QuoteGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -445,4 +445,5 @@ enum CartUserInputErrorType {
type StoreConfig {
is_guest_checkout_enabled: Boolean @doc(description: "Extended Config Data - checkout/options/guest_checkout")
is_one_page_checkout_enabled: Boolean @doc(description: "Extended Config Data - checkout/options/onepage_checkout_enabled")
max_items_in_order_summary: Int @doc(description: "Extended Config Data - checkout/options/max_items_display_count")
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
*/
class StoreConfigResolverTest extends GraphQlAbstract
{
private const MAX_ITEMS_TO_DISPLAY = 5;

#[
ConfigFixture(Data::XML_PATH_GUEST_CHECKOUT, true, ScopeInterface::SCOPE_STORE, 'default'),
ConfigFixture('checkout/options/onepage_checkout_enabled', true, ScopeInterface::SCOPE_STORE, 'default'),
ConfigFixture('checkout/options/max_items_display_count', self::MAX_ITEMS_TO_DISPLAY)
]
public function testGetStoreConfig(): void
{
Expand All @@ -29,6 +32,7 @@ public function testGetStoreConfig(): void
storeConfig {
is_guest_checkout_enabled,
is_one_page_checkout_enabled,
max_items_in_order_summary
}
}
QUERY;
Expand All @@ -47,5 +51,6 @@ private function validateStoreConfig(
): void {
$this->assertTrue($responseConfig['is_guest_checkout_enabled']);
$this->assertTrue($responseConfig['is_one_page_checkout_enabled']);
$this->assertEquals(self::MAX_ITEMS_TO_DISPLAY, $responseConfig['max_items_in_order_summary']);
}
}

0 comments on commit 80a353c

Please sign in to comment.