Skip to content

Commit f84a7c7

Browse files
committed
ACP2E-3523: Issue with Default Attribute Option Value Behavior for Multiselect
1 parent 7115fe4 commit f84a7c7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function execute()
271271
if (array_key_exists('reset_is-default_option', $data) && $data['reset_is-default_option']) {
272272
unset($data['reset_is-default_option']);
273273
$data['default_value'] = null;
274-
} elseif(isset($data['default'])) {
274+
} elseif (isset($data['default'])) {
275275
$data['default_value'] = implode(",", $data['default']);
276276
}
277277

app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
@@ -53,7 +53,7 @@
5353
<argument name="frontName" value="{{multiselectProductAttribute.option1_frontend}}"/>
5454
<argument name="row" value="1"/>
5555
</actionGroup>
56-
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption2">
56+
<actionGroup ref="CreateAttributeDropdownNthOptionAsDefaultActionGroup" stepKey="createOption2">
5757
<argument name="adminName" value="{{multiselectProductAttribute.option2_admin}}"/>
5858
<argument name="frontName" value="{{multiselectProductAttribute.option2_frontend}}"/>
5959
<argument name="row" value="2"/>
@@ -80,7 +80,7 @@
8080
<dontSeeCheckboxIsChecked stepKey="dontSeeOption1Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('1')}}"/>
8181
<seeInField stepKey="seeOption2Admin" selector="{{AttributePropertiesSection.dropdownNthOptionAdmin('2')}}" userInput="{{multiselectProductAttribute.option2_admin}}"/>
8282
<seeInField stepKey="seeOption2StoreView" selector="{{AttributePropertiesSection.dropdownNthOptionDefaultStoreView('2')}}" userInput="{{multiselectProductAttribute.option2_frontend}}"/>
83-
<dontSeeCheckboxIsChecked stepKey="dontSeeOption2Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('2')}}"/>
83+
<seeCheckboxIsChecked stepKey="dontSeeOption2Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('2')}}"/>
8484
<seeInField stepKey="seeOption3Admin" selector="{{AttributePropertiesSection.dropdownNthOptionAdmin('3')}}" userInput="{{multiselectProductAttribute.option3_admin}}"/>
8585
<seeInField stepKey="seeOption3StoreView" selector="{{AttributePropertiesSection.dropdownNthOptionDefaultStoreView('3')}}" userInput="{{multiselectProductAttribute.option3_frontend}}"/>
8686
<seeCheckboxIsChecked stepKey="seeOption3Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('3')}}"/>

0 commit comments

Comments
 (0)