Skip to content

Commit 165fddd

Browse files
merge magento/2.3-develop into magento-performance/MC-18718
2 parents 0350648 + 12bcf3f commit 165fddd

File tree

109 files changed

+2581
-621
lines changed

Some content is hidden

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

109 files changed

+2581
-621
lines changed

app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,35 @@
107107
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
108108
<requiredEntity type="custom_attribute">CustomAttributePriceViewRange</requiredEntity>
109109
</entity>
110+
<entity name="DynamicBundleProductCustomDescription" type="product2">
111+
<data key="name" unique="suffix">Test 123 Dynamic </data>
112+
<data key="sku" unique="suffix">test-dynamic-bundle-product</data>
113+
<data key="type_id">bundle</data>
114+
<data key="attribute_set_id">4</data>
115+
<data key="visibility">4</data>
116+
<data key="status">1</data>
117+
<data key="urlKey" unique="suffix">test-dynamic-bundle-product</data>
118+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
119+
<requiredEntity type="custom_attribute">CustomDynamicProductDescription</requiredEntity>
120+
<requiredEntity type="custom_attribute">CustomDynamicProductShortDescription</requiredEntity>
121+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
122+
<requiredEntity type="custom_attribute">CustomAttributePriceViewRange</requiredEntity>
123+
</entity>
124+
<entity name="FixedBundleProductCustomDescription" type="product2">
125+
<data key="name" unique="suffix">Test 123 Fixed </data>
126+
<data key="sku" unique="suffix">test-fixed-bundle-product</data>
127+
<data key="type_id">bundle</data>
128+
<data key="attribute_set_id">4</data>
129+
<data key="price">10</data>
130+
<data key="visibility">4</data>
131+
<data key="status">1</data>
132+
<data key="urlKey" unique="suffix">api-fixed-bundle-product</data>
133+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
134+
<requiredEntity type="custom_attribute">CustomFixedProductDescription</requiredEntity>
135+
<requiredEntity type="custom_attribute">CustomFixedProductShortDescription</requiredEntity>
136+
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
137+
<requiredEntity type="custom_attribute">CustomAttributeFixPrice</requiredEntity>
138+
<requiredEntity type="custom_attribute">CustomAttributeFixWeight</requiredEntity>
139+
<requiredEntity type="custom_attribute">CustomAttributeFixSku</requiredEntity>
140+
</entity>
110141
</entities>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Admin list bundle products"/>
15+
<title value="Admin should be able to mass update attributes for bundle products"/>
16+
<description value="Admin should be able to mass update attributes for bundle products"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-219"/>
19+
<group value="bundle"/>
20+
<group value="WYSIWYGDisabled"/>
21+
</annotations>
22+
<before>
23+
<!-- Create Simple Product -->
24+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
25+
<!-- Create Fixed Bundle Product -->
26+
<createData entity="ApiFixedBundleProduct" stepKey="createFixedBundleProduct"/>
27+
<!-- Create DropDown Bundle Option -->
28+
<createData entity="DropDownBundleOption" stepKey="createBundleOption">
29+
<requiredEntity createDataKey="createFixedBundleProduct"/>
30+
</createData>
31+
<!-- Link Simple Product -->
32+
<createData entity="ApiBundleLink" stepKey="createNewBundleLink">
33+
<requiredEntity createDataKey="createFixedBundleProduct"/>
34+
<requiredEntity createDataKey="createBundleOption"/>
35+
<requiredEntity createDataKey="createSimpleProduct"/>
36+
</createData>
37+
</before>
38+
<after>
39+
<!-- Delete Simple Product -->
40+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
41+
<!-- Delete Fixed Bundle Product -->
42+
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/>
43+
<!-- Clear Filter -->
44+
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/>
45+
<!--Log Out Admin-->
46+
<actionGroup ref="logout" stepKey="logoutAsAdmin"/>
47+
</after>
48+
<!-- Login as Admin -->
49+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
50+
<!-- Go to Catalog -> Catalog -> Products and Search created product in precondition and choose it -->
51+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchProduct">
52+
<argument name="product" value="$$createFixedBundleProduct$$"/>
53+
</actionGroup>
54+
<!-- Choose "Update attributes" and Change any product data -->
55+
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
56+
<argument name="product" value="UpdateAttributeNameAndDescription"/>
57+
</actionGroup>
58+
<!--Run cron twice-->
59+
<magentoCLI command="cron:run" stepKey="cronRun"/>
60+
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
61+
<!-- Search for a product with a new name and Open Product -->
62+
<actionGroup ref="filterProductGridByName" stepKey="searchWithNewProductName">
63+
<argument name="product" value="UpdateAttributeNameAndDescription"/>
64+
</actionGroup>
65+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openProductPage">
66+
<argument name="product" value="$$createFixedBundleProduct$$"/>
67+
</actionGroup>
68+
<!-- Assert product name and description -->
69+
<actionGroup ref="AssertProductNameInProductEditForm" stepKey="assertProductName">
70+
<argument name="productName" value="{{UpdateAttributeNameAndDescription.name}}"/>
71+
</actionGroup>
72+
<actionGroup ref="AssertProductDescriptionInProductEditForm" stepKey="assertProductDescription">
73+
<argument name="productDescription" value="{{UpdateAttributeNameAndDescription.description}}"/>
74+
</actionGroup>
75+
</test>
76+
</tests>
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontCustomerSearchBundleProductsByKeywordsTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Bundle products list on Storefront"/>
15+
<title value="Customer should be able to see search results when searching for bundle products by keyword"/>
16+
<description value="Customer should be able to see search results when searching for bundle products by keyword"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-227"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProductNotVisibleIndividually" stepKey="createSimpleProduct"/>
23+
<createData entity="DynamicBundleProductCustomDescription" stepKey="createDynamicBundle"/>
24+
<createData entity="DropDownBundleOption" stepKey="dynamicBundleOption">
25+
<requiredEntity createDataKey="createDynamicBundle"/>
26+
</createData>
27+
<createData entity="ApiBundleLink" stepKey="createDynamicBundleLink">
28+
<requiredEntity createDataKey="createDynamicBundle"/>
29+
<requiredEntity createDataKey="dynamicBundleOption"/>
30+
<requiredEntity createDataKey="createSimpleProduct"/>
31+
</createData>
32+
<createData entity="SimpleProductNotVisibleIndividually" stepKey="createSimpleProductTwo"/>
33+
<createData entity="FixedBundleProductCustomDescription" stepKey="createFixedBundle"/>
34+
<createData entity="DropDownBundleOption" stepKey="fixedBundleOption">
35+
<requiredEntity createDataKey="createFixedBundle"/>
36+
</createData>
37+
<createData entity="ApiBundleLink" stepKey="createFixedBundleLink">
38+
<requiredEntity createDataKey="createFixedBundle"/>
39+
<requiredEntity createDataKey="fixedBundleOption"/>
40+
<requiredEntity createDataKey="createSimpleProductTwo"/>
41+
</createData>
42+
<magentoCLI command="indexer:reindex" arguments="cataloginventory_stock catalogsearch_fulltext" stepKey="reindex"/>
43+
</before>
44+
<after>
45+
<deleteData createDataKey="createDynamicBundle" stepKey="deleteDynamicBundleProduct"/>
46+
<deleteData createDataKey="createFixedBundle" stepKey="deleteFixedBundleProduct"/>
47+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
48+
<deleteData createDataKey="createSimpleProductTwo" stepKey="createSimpleProductTwo"/>
49+
</after>
50+
<!-- 1. Go to storefront home page -->
51+
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
52+
<!-- 2. Fill quick search bar with test values unique for dynamic bundle product and click search -->
53+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchDynamic">
54+
<argument name="phrase" value="Dynamic"/>
55+
</actionGroup>
56+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByDynamic">
57+
<argument name="productName" value="$createDynamicBundle.name$"/>
58+
</actionGroup>
59+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="assertFixedBundleInSearchResultByDynamic">
60+
<argument name="productName" value="$createFixedBundle.name$"/>
61+
</actionGroup>
62+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByDescription">
63+
<argument name="phrase" value="Dynamicscription"/>
64+
</actionGroup>
65+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByDescription">
66+
<argument name="productName" value="$createDynamicBundle.name$"/>
67+
</actionGroup>
68+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeFixedBundleInSearchResultByDescription">
69+
<argument name="productName" value="$createFixedBundle.name$"/>
70+
</actionGroup>
71+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchShortDescription">
72+
<argument name="phrase" value="Dynamictest"/>
73+
</actionGroup>
74+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="assertDynamicBundleInSearchResultByShortDescription">
75+
<argument name="productName" value="$createDynamicBundle.name$"/>
76+
</actionGroup>
77+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeFixedBundleInSearchResultByShortDescription">
78+
<argument name="productName" value="$createFixedBundle.name$"/>
79+
</actionGroup>
80+
<!-- 3. Fill quick search bar with test values mutual for both products and click search -->
81+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchTest123">
82+
<argument name="phrase" value="Test 123"/>
83+
</actionGroup>
84+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByTest123">
85+
<argument name="productName" value="$createDynamicBundle.name$"/>
86+
</actionGroup>
87+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByTest123">
88+
<argument name="productName" value="$createFixedBundle.name$"/>
89+
</actionGroup>
90+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchTesting321">
91+
<argument name="phrase" value="Testing 321"/>
92+
</actionGroup>
93+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByTesting321">
94+
<argument name="productName" value="$createDynamicBundle.name$"/>
95+
</actionGroup>
96+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByTesting321">
97+
<argument name="productName" value="$createFixedBundle.name$"/>
98+
</actionGroup>
99+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchShort555">
100+
<argument name="phrase" value="Short 555"/>
101+
</actionGroup>
102+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeDynamicBundleByShort555">
103+
<argument name="productName" value="$createDynamicBundle.name$"/>
104+
</actionGroup>
105+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByShort555">
106+
<argument name="productName" value="$createFixedBundle.name$"/>
107+
</actionGroup>
108+
<!-- 4. Fill quick search bar with test values unique for fixed bundle product and click search -->
109+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByFixed">
110+
<argument name="phrase" value="Fixed"/>
111+
</actionGroup>
112+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByFixed">
113+
<argument name="productName" value="$createFixedBundle.name$"/>
114+
</actionGroup>
115+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicBundleByFixed">
116+
<argument name="productName" value="$createDynamicBundle.name$"/>
117+
</actionGroup>
118+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByDescriptionForFixed">
119+
<argument name="phrase" value="Fixedscription"/>
120+
</actionGroup>
121+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByDescriptionForFixed">
122+
<argument name="productName" value="$createFixedBundle.name$"/>
123+
</actionGroup>
124+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicProductByDescriptionForFixed">
125+
<argument name="productName" value="$createDynamicBundle.name$"/>
126+
</actionGroup>
127+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByShortDescriptionForFixed">
128+
<argument name="phrase" value="Fixedtest"/>
129+
</actionGroup>
130+
<actionGroup ref="StorefrontQuickSearchSeeProductByName" stepKey="seeFixedBundleByShortDescriptionForFixed">
131+
<argument name="productName" value="$createFixedBundle.name$"/>
132+
</actionGroup>
133+
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGrid" stepKey="dontSeeDynamicBundleByShortDescriptionForFixed">
134+
<argument name="productName" value="$createDynamicBundle.name$"/>
135+
</actionGroup>
136+
</test>
137+
</tests>

app/code/Magento/BundleGraphQl/Model/Resolver/Links/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ private function fetch() : array
117117
'price' => $link->getSelectionPriceValue(),
118118
'position' => $link->getPosition(),
119119
'id' => $link->getSelectionId(),
120-
'qty' => (int)$link->getSelectionQty(),
120+
'qty' => (float)$link->getSelectionQty(),
121+
'quantity' => (float)$link->getSelectionQty(),
121122
'is_default' => (bool)$link->getIsDefault(),
122123
'price_type' => $this->enumLookup->getEnumValueFromField(
123124
'PriceTypeEnum',

app/code/Magento/BundleGraphQl/etc/schema.graphqls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ type BundleItem @doc(description: "BundleItem defines an individual item in a bu
1414
type BundleItemOption @doc(description: "BundleItemOption defines characteristics and options for a specific bundle item.") {
1515
id: Int @doc(description: "The ID assigned to the bundled item option.")
1616
label: String @doc(description: "The text that identifies the bundled item option.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\Label")
17-
qty: Float @doc(description: "Indicates the quantity of this specific bundle item.")
17+
qty: Float @deprecated(reason: "The `qty` is deprecated. Use `quantity` instead.") @doc(description: "Indicates the quantity of this specific bundle item.")
18+
quantity: Float @doc(description: "Indicates the quantity of this specific bundle item.")
1819
position: Int @doc(description: "When a bundle item contains multiple options, the relative position of this option compared to the other options.")
1920
is_default: Boolean @doc(description: "Indicates whether this option is the default option.")
2021
price: Float @doc(description: "The price of the selected option.")

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,23 @@
557557
<remove keyForRemoval="seeCheckboxForWebsite"/>
558558
<dontSeeCheckboxIsChecked selector="{{ProductInWebsitesSection.website(website)}}" after="expandProductWebsitesSection" stepKey="seeCustomWebsiteIsNotChecked"/>
559559
</actionGroup>
560+
561+
<!-- You are on product Edit Page -->
562+
<!-- Assert Product Name in admin Product page -->
563+
<actionGroup name="AssertProductNameInProductEditForm">
564+
<arguments>
565+
<argument name="productName" type="string"/>
566+
</arguments>
567+
<seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{productName}}" stepKey="seeProductNameOnEditProductPage"/>
568+
</actionGroup>
569+
570+
<!-- You are on product Edit Page -->
571+
<!-- Assert Product Description in admin Product page -->
572+
<actionGroup name="AssertProductDescriptionInProductEditForm">
573+
<arguments>
574+
<argument name="productDescription" type="string"/>
575+
</arguments>
576+
<conditionalClick selector="{{AdminProductContentSection.sectionHeader}}" dependentSelector="{{AdminProductContentSection.sectionHeaderShow}}" visible="false" stepKey="expandContentSection"/>
577+
<seeInField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="{{productDescription}}" stepKey="seeProductDescription"/>
578+
</actionGroup>
560579
</actionGroups>

0 commit comments

Comments
 (0)