Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 1aa03a6

Browse files
Merge branch '2.3-develop' into 2.3-qwerty
2 parents 65f2357 + fb9e645 commit 1aa03a6

File tree

204 files changed

+8760
-526
lines changed

Some content is hidden

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

204 files changed

+8760
-526
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,12 @@
2323
<data key="attribute_code">price_view</data>
2424
<data key="value">0</data>
2525
</entity>
26+
<entity name="CustomAttributeFixWeight" type="custom_attribute">
27+
<data key="attribute_code">weight_type</data>
28+
<data key="value">1</data>
29+
</entity>
30+
<entity name="CustomAttributeFixSku" type="custom_attribute">
31+
<data key="attribute_code">sku_type</data>
32+
<data key="value">1</data>
33+
</entity>
2634
</entities>

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@
3131
<data key="fixedPriceFormatted">$10.00</data>
3232
<data key="defaultAttribute">Default</data>
3333
</entity>
34+
<entity name="FixedBundleProduct" type="product2">
35+
<data key="name" unique="suffix">FixedBundleProduct</data>
36+
<data key="sku" unique="suffix">fixed-bundle-product</data>
37+
<data key="type_id">bundle</data>
38+
<data key="attribute_set_id">4</data>
39+
<data key="price">1.23</data>
40+
<data key="visibility">4</data>
41+
<data key="status">1</data>
42+
<data key="urlKey" unique="suffix">fixed-bundle-product</data>
43+
<requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
44+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
45+
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
46+
<requiredEntity type="custom_attribute">CustomAttributeFixPrice</requiredEntity>
47+
<requiredEntity type="custom_attribute">CustomAttributeFixWeight</requiredEntity>
48+
<requiredEntity type="custom_attribute">CustomAttributeFixSku</requiredEntity>
49+
</entity>
3450
<entity name="ApiBundleProduct" type="product2">
3551
<data key="name" unique="suffix">Api Bundle Product</data>
3652
<data key="sku" unique="suffix">api-bundle-product</data>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminDeleteBundleDynamicProductTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Delete products"/>
14+
<title value="Delete Bundle Dynamic Product"/>
15+
<description value="Admin should be able to delete a bundle dynamic product"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-11016"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createDynamicBundleProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
29+
<actionGroup ref="logout" stepKey="logout"/>
30+
</after>
31+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteBundleProductFilteredBySkuAndName">
32+
<argument name="product" value="$$createDynamicBundleProduct$$"/>
33+
</actionGroup>
34+
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="A total of 1 record(s) have been deleted." stepKey="deleteMessage"/>
35+
<!-- Verify product on Product Page -->
36+
<amOnPage url="{{StorefrontProductPage.url($$createDynamicBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
37+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
38+
<!-- Search for the product by sku -->
39+
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createDynamicBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
40+
<waitForPageLoad stepKey="waitForSearchButton"/>
41+
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
42+
<waitForPageLoad stepKey="waitForSearchResults"/>
43+
<!-- Should not see any search results -->
44+
<dontSee userInput="$$createDynamicBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
45+
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
46+
<!-- Go to the category page that we created in the before block -->
47+
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
48+
<!-- Should not see the product -->
49+
<dontSee userInput="$$createDynamicBundleProduct.name$$" selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="dontSeeProductInCategory"/>
50+
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
51+
</test>
52+
</tests>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminDeleteBundleFixedProductTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Delete products"/>
14+
<title value="Delete Bundle Fixed Product"/>
15+
<description value="Admin should be able to delete a bundle fixed product"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-11017"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="FixedBundleProduct" stepKey="createFixedBundleProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
29+
<actionGroup ref="logout" stepKey="logout"/>
30+
</after>
31+
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteBundleProductFilteredBySkuAndName">
32+
<argument name="product" value="$$createFixedBundleProduct$$"/>
33+
</actionGroup>
34+
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="A total of 1 record(s) have been deleted." stepKey="deleteMessage"/>
35+
<!-- Verify product on Product Page -->
36+
<amOnPage url="{{StorefrontProductPage.url($$createFixedBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
37+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
38+
<!-- Search for the product by sku -->
39+
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createFixedBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
40+
<waitForPageLoad stepKey="waitForSearchButton"/>
41+
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
42+
<waitForPageLoad stepKey="waitForSearchResults"/>
43+
<!-- Should not see any search results -->
44+
<dontSee userInput="$$createFixedBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
45+
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
46+
<!-- Go to the category page that we created in the before block -->
47+
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
48+
<!-- Should not see the product -->
49+
<dontSee userInput="$$createFixedBundleProduct.name$$" selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="dontSeeProductInCategory"/>
50+
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
51+
</test>
52+
</tests>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
<click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomOptionsSection"/>
162162
<click selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" stepKey="clickAddOption"/>
163-
<fillField userInput="option1" selector="{{AdminProductCustomizableOptionsSection.optionTitleInput}}" stepKey="fillOptionTitle"/>
163+
<fillField selector="{{AdminProductCustomizableOptionsSection.optionTitleInput('0')}}" userInput="option1" stepKey="fillOptionTitle"/>
164164
<click selector="{{AdminProductCustomizableOptionsSection.optionTypeOpenDropDown}}" stepKey="openTypeDropDown"/>
165165
<click selector="{{AdminProductCustomizableOptionsSection.optionTypeTextField}}" stepKey="selectTypeTextField"/>
166166
<fillField userInput="20" selector="{{AdminProductCustomizableOptionsSection.maxCharactersInput}}" stepKey="fillMaxChars"/>
@@ -235,7 +235,7 @@
235235
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{sku}}" stepKey="fillProductSkuFilter"/>
236236
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
237237
<waitForPageLoad stepKey="waitForPageToLoad"/>
238-
<click selector="{{AdminProductModalSlideGridSection.productGridXRowYColumnButton('1', '1')}}" stepKey="selectProduct"/>
238+
<checkOption selector="{{AdminProductModalSlideGridSection.productRowCheckboxBySku(sku)}}" stepKey="selectProduct"/>
239239
<click selector="{{AdminAddRelatedProductsModalSection.AddSelectedProductsButton}}" stepKey="addRelatedProductSelected"/>
240240
</actionGroup>
241241

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

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,48 @@
5252
<argument name="ProductAttribute"/>
5353
</arguments>
5454
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
55-
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}"
56-
userInput="{{ProductAttribute.default_label}}" stepKey="setAttributeCode"/>
55+
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{ProductAttribute.default_label}}" stepKey="setAttributeCode"/>
5756
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
5857
<click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/>
5958
<waitForPageLoad stepKey="waitForPageLoad"/>
6059
<click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="deleteAttribute"/>
6160
<click selector="{{ModalConfirmationSection.OkButton}}" stepKey="ClickOnDeleteButton"/>
6261
<waitForPageLoad stepKey="waitForPageLoad1"/>
63-
<seeElement selector="{{AdminProductMessagesSection.successMessage}}"
64-
stepKey="waitForSuccessMessage"/>
62+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>
63+
</actionGroup>
64+
<!-- Delete product attribute by Attribute Code -->
65+
<actionGroup name="deleteProductAttributeByAttributeCode">
66+
<arguments>
67+
<argument name="ProductAttributeCode" type="string"/>
68+
</arguments>
69+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
70+
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{ProductAttributeCode}}" stepKey="setAttributeCode"/>
71+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
72+
<click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/>
73+
<waitForPageLoad stepKey="waitForPageLoad2" />
74+
<click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="deleteAttribute"/>
75+
<click selector="{{ModalConfirmationSection.OkButton}}" stepKey="ClickOnDeleteButton"/>
76+
<waitForPageLoad stepKey="waitForPageLoad"/>
77+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>
78+
</actionGroup>
79+
<!--Filter product attribute by Attribute Code -->
80+
<actionGroup name="filterProductAttributeByAttributeCode">
81+
<arguments>
82+
<argument name="ProductAttributeCode" type="string"/>
83+
</arguments>
84+
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/>
85+
<fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{ProductAttributeCode}}" stepKey="setAttributeCode"/>
86+
<waitForPageLoad stepKey="waitForUserInput"/>
87+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
88+
</actionGroup>
89+
<!--Filter product attribute by Default Label -->
90+
<actionGroup name="filterProductAttributeByDefaultLabel">
91+
<arguments>
92+
<argument name="productAttributeLabel" type="string"/>
93+
</arguments>
94+
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/>
95+
<fillField selector="{{AdminProductAttributeGridSection.GridFilterFrontEndLabel}}" userInput="{{productAttributeLabel}}" stepKey="setDefaultLabel"/>
96+
<waitForPageLoad stepKey="waitForUserInput"/>
97+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
6598
</actionGroup>
6699
</actionGroups>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@
4545
<fillField selector="{{AdminProductAttributeSetSection.name}}" userInput="{{label}}" stepKey="fillName"/>
4646
<click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickSave1"/>
4747
</actionGroup>
48+
<!-- Filter By Attribute Label -->
49+
<actionGroup name="filterProductAttributeByAttributeLabel">
50+
<arguments>
51+
<argument name="productAttributeLabel" type="string"/>
52+
</arguments>
53+
<fillField selector="{{AdminProductAttributeGridSection.attributeLabelFilter}}" userInput="{{productAttributeLabel}}" stepKey="setAttributeLabel"/>
54+
<waitForPageLoad stepKey="waitForUserInput"/>
55+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
56+
</actionGroup>
4857
</actionGroups>

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@
144144
<click selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="clickClearFiltersAfter"/>
145145
</actionGroup>
146146

147+
<!-- Filter product grid by sku, name -->
148+
<actionGroup name="filterProductGridBySkuAndName">
149+
<arguments>
150+
<argument name="product" defaultValue="_defaultProduct"/>
151+
</arguments>
152+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
153+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
154+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
155+
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{product.name}}" stepKey="fillProductNameFilter"/>
156+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
157+
</actionGroup>
158+
147159
<!--Delete a product by filtering grid and using delete action-->
148160
<actionGroup name="deleteProductUsingProductGrid">
149161
<arguments>
@@ -155,6 +167,7 @@
155167
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
156168
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
157169
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
170+
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{product.name}}" stepKey="fillProductNameFilter"/>
158171
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
159172
<see selector="{{AdminProductGridSection.productGridCell('1', 'SKU')}}" userInput="{{product.sku}}" stepKey="seeProductSkuInGrid"/>
160173
<click selector="{{AdminProductGridSection.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<argument name="productOption"/>
1616
<argument name="productOption2"/>
1717
</arguments>
18-
1918
<click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/>
2019
<waitForPageLoad stepKey="waitForAddProductPageLoad"/>
2120

@@ -48,10 +47,9 @@
4847
<fillField selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{option.title}}" stepKey="fillTitle"/>
4948
<click selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}" stepKey="openTypeSelect"/>
5049
<click selector="{{AdminProductCustomizableOptionsSection.optionType('File')}}" stepKey="selectTypeFile"/>
51-
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.optionPrice}}" stepKey="waitForElements"/>
52-
<fillField selector="{{AdminProductCustomizableOptionsSection.optionPrice}}" userInput="{{option.price}}" stepKey="fillPrice"/>
53-
<selectOption selector="{{AdminProductCustomizableOptionsSection.optionPriceType}}" userInput="{{option.price_type}}" stepKey="selectPriceType"/>
54-
<fillField selector="{{AdminProductCustomizableOptionsSection.optionFileExtensions}}" userInput="{{option.file_extension}}" stepKey="fillCompatibleExtensions"/>
50+
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.optionPrice('0')}}" stepKey="waitForElements"/>
51+
<fillField selector="{{AdminProductCustomizableOptionsSection.optionPrice('0')}}" userInput="{{option.price}}" stepKey="fillPrice"/>
52+
<selectOption selector="{{AdminProductCustomizableOptionsSection.optionPriceType('0')}}" userInput="{{option.price_type}}" stepKey="selectPriceType"/>
53+
<fillField selector="{{AdminProductCustomizableOptionsSection.optionFileExtensions('0')}}" userInput="{{option.file_extension}}" stepKey="fillCompatibleExtensions"/>
5554
</actionGroup>
56-
5755
</actionGroups>

0 commit comments

Comments
 (0)