Skip to content

Commit 418c6e8

Browse files
author
John Carlo Octabio
committed
#108: Clear Shopping Cart - Refactor MFTF and PHP files for PR changes requested
1 parent b65a287 commit 418c6e8

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

app/code/Magento/Checkout/Test/Mftf/Test/ClearShoppingCartEnableDisableConfigurationTest.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<title value="Enable and Disable Clear Shopping Cart Configuration"/>
1515
<description value="Verify that disabling the clear shopping cart store configuration will remove the clear shopping cart configuration button from the storefront's shopping cart page. Verify that enabling the configuration will add the button to the page and that the button functions as expected"/>
1616
<group value="shoppingCart"/>
17+
<severity value="MAJOR"/>
1718
</annotations>
1819
<before>
1920
<!-- Create simple products and category -->
@@ -45,9 +46,6 @@
4546
<!-- Enable clear shopping cart button -->
4647
<actionGroup ref="AdminSelectClearShoppingCartConfigurationActionGroup" stepKey="enableClearShoppingCartButton"/>
4748
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="saveStoreConfiguration1"/>
48-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cliCacheClean1">
49-
<argument name="tags" value=""/>
50-
</actionGroup>
5149

5250
<!-- Open product 1 and add to cart -->
5351
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProduct1Page1">
@@ -74,9 +72,6 @@
7472
<argument name="value" value="{{DisableClearShoppingCart.textValue}}"/>
7573
</actionGroup>
7674
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="saveStoreConfiguration2"/>
77-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cliCacheClean2">
78-
<argument name="tags" value=""/>
79-
</actionGroup>
8075

8176
<!-- Open product 1 page and add to cart -->
8277
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProduct1Page2">

app/code/Magento/Checkout/ViewModel/Cart.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
use Magento\Framework\View\Element\Context;
1212
use Magento\Store\Model\ScopeInterface;
1313

14+
/**
15+
* Cart form view model.
16+
*/
1417
class Cart implements ArgumentInterface
1518
{
1619
/**
1720
* Config settings path to enable clear shopping cart button
1821
*/
19-
public const XPATH_CONFIG_ENABLE_CLEAR_SHOPPING_CART = 'checkout/cart/enable_clear_shopping_cart';
22+
private const XPATH_CONFIG_ENABLE_CLEAR_SHOPPING_CART = 'checkout/cart/enable_clear_shopping_cart';
2023

2124
/**
2225
* @var ScopeConfigInterface

dev/tests/integration/testsuite/Magento/Checkout/ViewModel/CartTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/**
1818
* Test for clear shopping cart config
1919
*
20-
* @package Magento\Checkout\ViewModel
2120
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2221
*/
2322
class CartTest extends TestCase

0 commit comments

Comments
 (0)