Skip to content

Commit 4a27431

Browse files
committed
AC-2242::fixed failing mftf test case and implemented PR comment
1 parent 01b4af6 commit 4a27431

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public function execute()
6464
{
6565
$data = $this->getRequest()->getPostValue();
6666
if ($data) {
67-
$data['simple_free_shipping'] = isset($data['simple_free_shipping']) ? $data['simple_free_shipping'] : null
68-
67+
if ($data['simple_free_shipping'] === '') {
68+
$data['simple_free_shipping'] = null;
69+
}
6970
try {
7071
/** @var $model \Magento\SalesRule\Model\Rule */
7172
$model = $this->_objectManager->create(\Magento\SalesRule\Model\Rule::class);

app/code/Magento/SalesRule/Test/Mftf/Test/SimplefreeshippingoptionsTest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.name}}" stepKey="fillRuleName"/>
3838
<fillField selector="{{AdminCartPriceRulesFormSection.description}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.description}}" stepKey="fillDescription"/>
3939
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.websites}}" stepKey="selectWebsites"/>
40-
<click selector="{{AdminCartPriceRulesFormSection.customerGroups}}" stepKey="expandCustomerGroups"/>
41-
<fillField selector="{{AdminCartPriceRulesFormSection.customerGroupsInput}}" userInput="General" stepKey="fillCustomerGroup"/>
42-
<click selector="{{AdminCartPriceRulesFormSection.customerGroupsFirstResult}}" stepKey="selectGroup"/>
43-
<click selector="{{AdminCartPriceRulesFormSection.customerGroupsDoneBtn}}" stepKey="closeMultiSelect"/>
40+
<selectOption userInput="{{SimpleCatalogPriceRule.customerGroups}}" selector="{{AdminCartPriceRulesFormSection.customerGroups}}" stepKey="selectCustomerGroups"/>
4441
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.coupon_type}}" stepKey="selectCouponType"/>
4542
<scrollTo selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="scrollToActionsHeader"/>
4643
<actionGroup ref="AdminCreateCartPriceRuleActionsSectionDiscountFieldsActionGroup" stepKey="createActiveCartPriceRuleActionsSection">

0 commit comments

Comments
 (0)