Skip to content

Commit 79b8f97

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-22807
2 parents 503b53d + 7324325 commit 79b8f97

File tree

142 files changed

+5732
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5732
-652
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,17 @@
146146
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '4')}}" userInput="2" stepKey="fillQuantity5" after="fillQuantity4"/>
147147
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '5')}}" userInput="2" stepKey="fillQuantity6" after="fillQuantity5"/>
148148
</actionGroup>
149+
150+
<actionGroup name="deleteBundleOptionByIndex">
151+
<annotations>
152+
<description>Requires Navigation to Product Creation page. Removes any Bundle Option by index specified in arguments. 'deleteIndex' refers to Bundle option number.</description>
153+
</annotations>
154+
<arguments>
155+
<argument name="deleteIndex" type="string"/>
156+
</arguments>
157+
158+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
159+
<scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" stepKey="scrollUpABit"/>
160+
<click selector="{{AdminProductFormBundleSection.deleteOption(deleteIndex)}}" stepKey="clickDeleteOption"/>
161+
</actionGroup>
149162
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<element name="currentBundleOption" type="text" selector="//div[@data-index='bundle-items']//div[contains(@class, 'admin__collapsible-title')]/span"/>
4747
<!--AddingAnOption-->
4848
<element name="addOptions" type="button" selector="//tr[@data-repeat-index='0']//td[4]" timeout="30"/>
49+
<!--DragAnOption -->
50+
<element name="dragOption" type="block" selector="//tr[{{dragIndex}}]//div[contains(@class, 'draggable-handle')]" timeout="30" parameterized="true"/>
51+
<!--DeleteAnOption -->
52+
<element name="deleteOption" type="button" selector="//tr[{{deleteIndex}}]//button[@data-index='delete_button']" timeout="30" parameterized="true"/>
4953
<!--SEODropdownTab-->
5054
<element name="seoDropdown" type="button" selector="//div[@data-index='search-engine-optimization']"/>
5155
<element name="seoDependent" type="button" selector="//div[@data-index='search-engine-optimization']//div[contains(@class, '_show')]"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,116 @@
141141
<argument name="websiteName" value="$createWebsite.website[name]$"/>
142142
</actionGroup>
143143
</test>
144+
<test name="AdminCreateAndEditBundleProductOptionsNegativeTest">
145+
<annotations>
146+
<features value="Bundle"/>
147+
<stories value="Modify bundle product in Admin"/>
148+
<title value="Admin should be able to remove any bundle option a bundle product"/>
149+
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/>
150+
<severity value="MAJOR"/>
151+
<testCaseId value="MC-224"/>
152+
<skip>
153+
<issueId value="https://github.com/magento/magento2/issues/25468"/>
154+
</skip>
155+
<group value="Catalog"/>
156+
</annotations>
157+
<before>
158+
<!-- Create a Website -->
159+
<createData entity="customWebsite" stepKey="createWebsite"/>
160+
161+
<!-- Create first simple product for a bundle option -->
162+
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/>
163+
164+
<!-- Create second simple product for a bundle option -->
165+
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>
166+
167+
<!-- Login as admin -->
168+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
169+
</before>
170+
<after>
171+
<!-- Delete the simple product -->
172+
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
173+
174+
<!-- Delete the simple product -->
175+
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
176+
177+
<!-- Delete a Website -->
178+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
179+
<argument name="websiteName" value="Second Website"/>
180+
</actionGroup>
181+
182+
<!-- Log out -->
183+
<actionGroup ref="logout" stepKey="logout"/>
184+
</after>
185+
186+
<!-- Create new bundle product -->
187+
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="createBundleProduct">
188+
<argument name="productType" value="bundle"/>
189+
</actionGroup>
190+
191+
<!-- Fill all main fields -->
192+
<actionGroup ref="fillMainBundleProductForm" stepKey="fillMainProductFields"/>
193+
194+
<!-- Add first bundle option to the product -->
195+
<actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addFirstBundleOption">
196+
<argument name="x" value="0"/>
197+
<argument name="n" value="1"/>
198+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
199+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
200+
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
201+
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
202+
</actionGroup>
203+
204+
<!-- Add second bundle option to the product -->
205+
<actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addSecondBundleOption">
206+
<argument name="x" value="1"/>
207+
<argument name="n" value="2"/>
208+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
209+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
210+
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
211+
<argument name="inputType" value="{{CheckboxOption.type}}"/>
212+
</actionGroup>
213+
214+
<!-- Add third bundle option to the product -->
215+
<actionGroup ref="addBundleOptionWithTwoProducts" stepKey="addThirdBundleOption">
216+
<argument name="x" value="2"/>
217+
<argument name="n" value="3"/>
218+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
219+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
220+
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
221+
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
222+
</actionGroup>
223+
224+
<!-- Set product in created Website -->
225+
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites">
226+
<argument name="website" value="$createWebsite.website[name]$"/>
227+
</actionGroup>
228+
229+
<!-- Save product form -->
230+
<actionGroup ref="saveProductForm" stepKey="saveWithThreeOptions"/>
231+
232+
<!-- Open created product -->
233+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
234+
<argument name="product" value="BundleProduct"/>
235+
</actionGroup>
236+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
237+
<argument name="product" value="BundleProduct"/>
238+
</actionGroup>
239+
240+
<!-- Remove second option -->
241+
<actionGroup ref="deleteBundleOptionByIndex" stepKey="deleteSecondOption">
242+
<argument name="deleteIndex" value="1"/>
243+
</actionGroup>
244+
245+
<!-- Save product form -->
246+
<actionGroup ref="saveProductForm" stepKey="clickSaveProduct"/>
247+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/>
248+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
249+
250+
<!-- Delete created bundle product -->
251+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct">
252+
<argument name="product" value="BundleProduct"/>
253+
</actionGroup>
254+
</test>
144255
</tests>
145256

app/code/Magento/Bundle/etc/di.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,17 @@
221221
</argument>
222222
</arguments>
223223
</type>
224+
<type name="Magento\Eav\Model\Config">
225+
<arguments>
226+
<argument name="attributesForPreload" xsi:type="array">
227+
<item name="catalog_product" xsi:type="array">
228+
<item name="price_type" xsi:type="string">catalog_product</item>
229+
<item name="price_view" xsi:type="string">catalog_product</item>
230+
<item name="shipment_type" xsi:type="string">catalog_product</item>
231+
<item name="sku_type" xsi:type="string">catalog_product</item>
232+
<item name="weight_type" xsi:type="string">catalog_product</item>
233+
</item>
234+
</argument>
235+
</arguments>
236+
</type>
224237
</config>

app/code/Magento/Catalog/Model/Config.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Magento\Framework\Serialize\SerializerInterface;
1010

1111
/**
12+
* Catalog config model.
13+
*
1214
* @SuppressWarnings(PHPMD.LongVariable)
1315
* @SuppressWarnings(PHPMD.TooManyFields)
1416
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -133,6 +135,7 @@ class Config extends \Magento\Eav\Model\Config
133135
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
134136
* @param \Magento\Eav\Model\Config $eavConfig
135137
* @param SerializerInterface $serializer
138+
* @param array $attributesForPreload
136139
*
137140
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
138141
*/
@@ -149,7 +152,8 @@ public function __construct(
149152
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $setCollectionFactory,
150153
\Magento\Store\Model\StoreManagerInterface $storeManager,
151154
\Magento\Eav\Model\Config $eavConfig,
152-
SerializerInterface $serializer = null
155+
SerializerInterface $serializer = null,
156+
$attributesForPreload = []
153157
) {
154158
$this->_scopeConfig = $scopeConfig;
155159
$this->_configFactory = $configFactory;
@@ -165,7 +169,9 @@ public function __construct(
165169
$entityTypeCollectionFactory,
166170
$cacheState,
167171
$universalFactory,
168-
$serializer
172+
$serializer,
173+
$scopeConfig,
174+
$attributesForPreload
169175
);
170176
}
171177

app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919
<group value="Catalog"/>
2020
</annotations>
2121
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<actionGroup ref="deleteAllProductsUsingProductGrid" stepKey="deleteAllProducts"/>
2224
<createData entity="ApiProductWithDescription" stepKey="product"/>
2325
</before>
2426
<after>
2527
<deleteData createDataKey="product" stepKey="delete"/>
28+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
2629
</after>
2730
</test>
2831
<test name="AdvanceCatalogSearchSimpleProductBySkuTest">

app/code/Magento/Catalog/etc/di.xml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,4 +1243,83 @@
12431243
<argument name="manager" xsi:type="object">Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager\Proxy</argument>
12441244
</arguments>
12451245
</type>
1246+
<type name="Magento\Eav\Model\Config">
1247+
<arguments>
1248+
<argument name="attributesForPreload" xsi:type="array">
1249+
<item name="catalog_product" xsi:type="array">
1250+
<item name="category_ids" xsi:type="string">catalog_product</item>
1251+
<item name="country_of_manufacture" xsi:type="string">catalog_product</item>
1252+
<item name="created_at" xsi:type="string">catalog_product</item>
1253+
<item name="custom_design" xsi:type="string">catalog_product</item>
1254+
<item name="custom_design_from" xsi:type="string">catalog_product</item>
1255+
<item name="custom_design_to" xsi:type="string">catalog_product</item>
1256+
<item name="custom_layout" xsi:type="string">catalog_product</item>
1257+
<item name="custom_layout_update" xsi:type="string">catalog_product</item>
1258+
<item name="description" xsi:type="string">catalog_product</item>
1259+
<item name="gallery" xsi:type="string">catalog_product</item>
1260+
<item name="has_options" xsi:type="string">catalog_product</item>
1261+
<item name="image" xsi:type="string">catalog_product</item>
1262+
<item name="image_label" xsi:type="string">catalog_product</item>
1263+
<item name="media_gallery" xsi:type="string">catalog_product</item>
1264+
<item name="meta_description" xsi:type="string">catalog_product</item>
1265+
<item name="meta_keyword" xsi:type="string">catalog_product</item>
1266+
<item name="meta_title" xsi:type="string">catalog_product</item>
1267+
<item name="minimal_price" xsi:type="string">catalog_product</item>
1268+
<item name="name" xsi:type="string">catalog_product</item>
1269+
<item name="news_from_date" xsi:type="string">catalog_product</item>
1270+
<item name="news_to_date" xsi:type="string">catalog_product</item>
1271+
<item name="old_id" xsi:type="string">catalog_product</item>
1272+
<item name="options_container" xsi:type="string">catalog_product</item>
1273+
<item name="page_layout" xsi:type="string">catalog_product</item>
1274+
<item name="price" xsi:type="string">catalog_product</item>
1275+
<item name="quantity_and_stock_status" xsi:type="string">catalog_product</item>
1276+
<item name="required_options" xsi:type="string">catalog_product</item>
1277+
<item name="short_description" xsi:type="string">catalog_product</item>
1278+
<item name="sku" xsi:type="string">catalog_product</item>
1279+
<item name="small_image" xsi:type="string">catalog_product</item>
1280+
<item name="small_image_label" xsi:type="string">catalog_product</item>
1281+
<item name="special_from_date" xsi:type="string">catalog_product</item>
1282+
<item name="special_price" xsi:type="string">catalog_product</item>
1283+
<item name="special_to_date" xsi:type="string">catalog_product</item>
1284+
<item name="status" xsi:type="string">catalog_product</item>
1285+
<item name="thumbnail" xsi:type="string">catalog_product</item>
1286+
<item name="thumbnail_label" xsi:type="string">catalog_product</item>
1287+
<item name="tier_price" xsi:type="string">catalog_product</item>
1288+
<item name="updated_at" xsi:type="string">catalog_product</item>
1289+
<item name="visibility" xsi:type="string">catalog_product</item>
1290+
<item name="weight" xsi:type="string">catalog_product</item>
1291+
</item>
1292+
<item name="catalog_category" xsi:type="array">
1293+
<item name="all_children" xsi:type="string">catalog_category</item>
1294+
<item name="available_sort_by" xsi:type="string">catalog_category</item>
1295+
<item name="children" xsi:type="string">catalog_category</item>
1296+
<item name="children_count" xsi:type="string">catalog_category</item>
1297+
<item name="custom_apply_to_products" xsi:type="string">catalog_category</item>
1298+
<item name="custom_design" xsi:type="string">catalog_category</item>
1299+
<item name="custom_design_from" xsi:type="string">catalog_category</item>
1300+
<item name="custom_design_to" xsi:type="string">catalog_category</item>
1301+
<item name="custom_layout_update" xsi:type="string">catalog_category</item>
1302+
<item name="custom_use_parent_settings" xsi:type="string">catalog_category</item>
1303+
<item name="default_sort_by" xsi:type="string">catalog_category</item>
1304+
<item name="description" xsi:type="string">catalog_category</item>
1305+
<item name="display_mode" xsi:type="string">catalog_category</item>
1306+
<item name="filter_price_range" xsi:type="string">catalog_category</item>
1307+
<item name="image" xsi:type="string">catalog_category</item>
1308+
<item name="include_in_menu" xsi:type="string">catalog_category</item>
1309+
<item name="is_active" xsi:type="string">catalog_category</item>
1310+
<item name="is_anchor" xsi:type="string">catalog_category</item>
1311+
<item name="landing_page" xsi:type="string">catalog_category</item>
1312+
<item name="level" xsi:type="string">catalog_category</item>
1313+
<item name="meta_description" xsi:type="string">catalog_category</item>
1314+
<item name="meta_keywords" xsi:type="string">catalog_category</item>
1315+
<item name="meta_title" xsi:type="string">catalog_category</item>
1316+
<item name="name" xsi:type="string">catalog_category</item>
1317+
<item name="page_layout" xsi:type="string">catalog_category</item>
1318+
<item name="path" xsi:type="string">catalog_category</item>
1319+
<item name="path_in_store" xsi:type="string">catalog_category</item>
1320+
<item name="position" xsi:type="string">catalog_category</item>
1321+
</item>
1322+
</argument>
1323+
</arguments>
1324+
</type>
12461325
</config>

app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/AdminAssertDisabledQtyActionGroup.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)