Skip to content

Commit 518312b

Browse files
author
Aliaksei Yakimovich2
committed
Merge branch '2.3-develop' into MAGETWO-70803
2 parents f5e8efa + e93feb0 commit 518312b

File tree

140 files changed

+7084
-754
lines changed

Some content is hidden

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

140 files changed

+7084
-754
lines changed

app/code/Magento/Braintree/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"magento/module-sales": "*",
2323
"magento/module-ui": "*",
2424
"magento/module-vault": "*",
25-
"magento/module-multishipping": "*"
25+
"magento/module-multishipping": "*",
26+
"magento/module-theme": "*"
2627
},
2728
"suggest": {
28-
"magento/module-checkout-agreements": "*",
29-
"magento/module-theme": "*"
29+
"magento/module-checkout-agreements": "*"
3030
},
3131
"type": "magento2-module",
3232
"license": [
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
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="StorefrontSortBundleProductsByPriceTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Bundle products list on Storefront"/>
15+
<title value="Customer should be able to sort bundle products by price when viewing products list"/>
16+
<description value="Customer should be able to sort bundle products by price when viewing products list"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-228"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<!-- Create category -->
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
25+
<!-- Create simple products for first bundle product -->
26+
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct">
27+
<field key="price">100.00</field>
28+
</createData>
29+
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>
30+
31+
<!-- Create first bundle product -->
32+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createFirstBundleProduct">
33+
<requiredEntity createDataKey="createCategory"/>
34+
</createData>
35+
<createData entity="DropDownBundleOption" stepKey="firstProductBundleOption">
36+
<requiredEntity createDataKey="createFirstBundleProduct"/>
37+
</createData>
38+
<createData entity="ApiBundleLink" stepKey="createFirstBundleLink">
39+
<requiredEntity createDataKey="createFirstBundleProduct"/>
40+
<requiredEntity createDataKey="firstProductBundleOption"/>
41+
<requiredEntity createDataKey="createFirstSimpleProduct"/>
42+
</createData>
43+
<createData entity="ApiBundleLink" stepKey="createSecondBundleLink">
44+
<requiredEntity createDataKey="createFirstBundleProduct"/>
45+
<requiredEntity createDataKey="firstProductBundleOption"/>
46+
<requiredEntity createDataKey="createSecondSimpleProduct"/>
47+
</createData>
48+
49+
<!-- Create simple products for second bundle product -->
50+
<createData entity="SimpleProduct2" stepKey="createFirstProduct">
51+
<field key="price">10.00</field>
52+
</createData>
53+
<createData entity="SimpleProduct2" stepKey="createSecondProduct"/>
54+
55+
<!-- Create second bundle product -->
56+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createSecondBundleProduct">
57+
<requiredEntity createDataKey="createCategory"/>
58+
</createData>
59+
<createData entity="DropDownBundleOption" stepKey="secondProductBundleOption">
60+
<requiredEntity createDataKey="createSecondBundleProduct"/>
61+
</createData>
62+
<createData entity="ApiBundleLink" stepKey="createBundleLinkFirst">
63+
<requiredEntity createDataKey="createSecondBundleProduct"/>
64+
<requiredEntity createDataKey="secondProductBundleOption"/>
65+
<requiredEntity createDataKey="createFirstProduct"/>
66+
</createData>
67+
<createData entity="ApiBundleLink" stepKey="createBundleLinkSecond">
68+
<requiredEntity createDataKey="createSecondBundleProduct"/>
69+
<requiredEntity createDataKey="secondProductBundleOption"/>
70+
<requiredEntity createDataKey="createSecondProduct"/>
71+
</createData>
72+
73+
<!-- Create simple products for third bundle product -->
74+
<createData entity="SimpleProduct2" stepKey="createFirstProductForBundle"/>
75+
<createData entity="SimpleProduct2" stepKey="createSecondProductForBundle">
76+
<field key="price">500.00</field>
77+
</createData>
78+
79+
<!-- Create third bundle product -->
80+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createThirdBundleProduct">
81+
<requiredEntity createDataKey="createCategory"/>
82+
</createData>
83+
<createData entity="DropDownBundleOption" stepKey="createThirdProductBundleOption">
84+
<requiredEntity createDataKey="createThirdBundleProduct"/>
85+
</createData>
86+
<createData entity="ApiBundleLink" stepKey="createBundleFirstLink">
87+
<requiredEntity createDataKey="createThirdBundleProduct"/>
88+
<requiredEntity createDataKey="createThirdProductBundleOption"/>
89+
<requiredEntity createDataKey="createFirstProductForBundle"/>
90+
</createData>
91+
<createData entity="ApiBundleLink" stepKey="createBundleSecondLink">
92+
<requiredEntity createDataKey="createThirdBundleProduct"/>
93+
<requiredEntity createDataKey="createThirdProductBundleOption"/>
94+
<requiredEntity createDataKey="createSecondProductForBundle"/>
95+
</createData>
96+
97+
<!-- Perform CLI reindex -->
98+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
99+
</before>
100+
<after>
101+
<!-- Delete all created data -->
102+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
103+
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
104+
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
105+
<deleteData createDataKey="createFirstBundleProduct" stepKey="deleteFirstBundleProduct"/>
106+
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
107+
<deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
108+
<deleteData createDataKey="createSecondBundleProduct" stepKey="deleteSecondBundleProduct"/>
109+
<deleteData createDataKey="createFirstProductForBundle" stepKey="deleteFirstProductForBundle"/>
110+
<deleteData createDataKey="createSecondProductForBundle" stepKey="deleteSecondProductForBundle"/>
111+
<deleteData createDataKey="createThirdBundleProduct" stepKey="deleteThirdBundleProduct"/>
112+
</after>
113+
114+
<!-- Open created category on Storefront -->
115+
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openCategoryPage">
116+
<argument name="categoryName" value="$$createCategory.name$$"/>
117+
</actionGroup>
118+
119+
<!-- Assert first bundle products in category product grid -->
120+
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertFirstBundleProduct">
121+
<argument name="product" value="$$createFirstBundleProduct$$"/>
122+
</actionGroup>
123+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForFirstBundleProduct">
124+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createFirstBundleProduct.id$$)}}"/>
125+
<argument name="userInput" value="From $100.00"/>
126+
</actionGroup>
127+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeToForFirstBundleProduct">
128+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceToByProductId($$createFirstBundleProduct.id$$)}}"/>
129+
<argument name="userInput" value="To $123.00"/>
130+
</actionGroup>
131+
132+
<!-- Assert second bundle products in category product grid -->
133+
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertSecondBundleProduct">
134+
<argument name="product" value="$$createSecondBundleProduct$$"/>
135+
</actionGroup>
136+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForSecondBundleProduct">
137+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createSecondBundleProduct.id$$)}}"/>
138+
<argument name="userInput" value="From $10.00"/>
139+
</actionGroup>
140+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeToForSecondBundleProduct">
141+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceToByProductId($$createSecondBundleProduct.id$$)}}"/>
142+
<argument name="userInput" value="To $123.00"/>
143+
</actionGroup>
144+
145+
<!-- Assert third bundle products in category product grid -->
146+
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertThirdBundleProduct">
147+
<argument name="product" value="$$createThirdBundleProduct$$"/>
148+
</actionGroup>
149+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForThirdBundleProduct">
150+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createThirdBundleProduct.id$$)}}"/>
151+
<argument name="userInput" value="From $123.00"/>
152+
</actionGroup>
153+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeToForThirdBundleProduct">
154+
<argument name="selector" value="{{StorefrontCategoryProductSection.priceToByProductId($$createThirdBundleProduct.id$$)}}"/>
155+
<argument name="userInput" value="To $500.00"/>
156+
</actionGroup>
157+
158+
<!-- Switch category view to List mode -->
159+
<actionGroup ref="StorefrontSwitchCategoryViewToListMode" stepKey="switchCategoryViewToListMode"/>
160+
161+
<!-- Sort products By Price -->
162+
<actionGroup ref="StorefrontCategoryPageSortProductActionGroup" stepKey="sortProductByPrice"/>
163+
<!-- Set Ascending Direction -->
164+
<actionGroup ref="StorefrontCategoryPageSortAscendingActionGroup" stepKey="setAscendingDirection"/>
165+
166+
<!-- Assert new products positions -->
167+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductFirstPosition">
168+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('1')}}"/>
169+
<argument name="userInput" value="$$createThirdBundleProduct.name$$"/>
170+
</actionGroup>
171+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductSecondPosition">
172+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('2')}}"/>
173+
<argument name="userInput" value="$$createFirstBundleProduct.name$$"/>
174+
</actionGroup>
175+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductThirdPosition">
176+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('3')}}"/>
177+
<argument name="userInput" value="$$createSecondBundleProduct.name$$"/>
178+
</actionGroup>
179+
180+
<!-- Set Descending Direction -->
181+
<actionGroup ref="StorefrontCategoryPageSortDescendingActionGroup" stepKey="setDescendingDirection"/>
182+
183+
<!-- Assert new products positions -->
184+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductNewFirstPosition">
185+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('1')}}"/>
186+
<argument name="userInput" value="$$createSecondBundleProduct.name$$"/>
187+
</actionGroup>
188+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductNewSecondPosition">
189+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('2')}}"/>
190+
<argument name="userInput" value="$$createFirstBundleProduct.name$$"/>
191+
</actionGroup>
192+
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seeProductNewThirdPosition">
193+
<argument name="selector" value="{{StorefrontCategoryMainSection.lineProductName('3')}}"/>
194+
<argument name="userInput" value="$$createThirdBundleProduct.name$$"/>
195+
</actionGroup>
196+
</test>
197+
</tests>

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,29 @@
411411
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearchButton"/>
412412
<click selector="{{AdminCategoryContentSection.productTableRow}}" stepKey="selectProductFromTableRow"/>
413413
</actionGroup>
414+
415+
<actionGroup name="DeleteDefaultCategoryChildren">
416+
<annotations>
417+
<description>Deletes all children categories of Default Root Category.</description>
418+
</annotations>
419+
420+
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToAdminCategoryPage"/>
421+
<executeInSelenium function="function ($webdriver) use ($I) {
422+
$children = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//ul[contains(@class, \'x-tree-node-ct\')]/li[@class=\'x-tree-node\' and contains(.,
423+
\'{{DefaultCategory.name}}\')]/ul[contains(@class, \'x-tree-node-ct\')]/li//a'));
424+
while (!empty($children)) {
425+
$I->click('//ul[contains(@class, \'x-tree-node-ct\')]/li[@class=\'x-tree-node\' and contains(.,
426+
\'{{DefaultCategory.name}}\')]/ul[contains(@class, \'x-tree-node-ct\')]/li//a');
427+
$I->waitForPageLoad(30);
428+
$I->click('#delete');
429+
$I->waitForElementVisible('aside.confirm .modal-footer button.action-accept');
430+
$I->click('aside.confirm .modal-footer button.action-accept');
431+
$I->waitForPageLoad(30);
432+
$I->waitForElementVisible('#messages div.message-success', 30);
433+
$I->see('You deleted the category.', '#messages div.message-success');
434+
$children = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//ul[contains(@class, \'x-tree-node-ct\')]/li[@class=\'x-tree-node\' and contains(.,
435+
\'{{DefaultCategory.name}}\')]/ul[contains(@class, \'x-tree-node-ct\')]/li//a'));
436+
}
437+
}" stepKey="deleteAllChildCategories"/>
438+
</actionGroup>
414439
</actionGroups>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@
7878
<seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart"/>
7979
</actionGroup>
8080

81+
<actionGroup name="AssertProductOnCategoryPageActionGroup" extends="StorefrontCheckCategorySimpleProduct">
82+
<annotations>
83+
<description>EXTENDS:StorefrontCheckCategorySimpleProduct. Removes 'AssertProductPrice', 'moveMouseOverProduct', 'AssertAddToCart'</description>
84+
</annotations>
85+
<remove keyForRemoval="AssertProductPrice"/>
86+
<remove keyForRemoval="moveMouseOverProduct"/>
87+
<remove keyForRemoval="AssertAddToCart"/>
88+
</actionGroup>
89+
8190
<actionGroup name="StorefrontCheckAddToCartButtonAbsence">
8291
<arguments>
8392
<argument name="product" defaultValue="_defaultProduct"/>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontCategoryPageSortProductActionGroup">
12+
<annotations>
13+
<description>Select "Sort by" parameter for sorting Products on Category page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="sortBy" type="string" defaultValue="Price"/>
17+
</arguments>
18+
<selectOption selector="{{StorefrontCategoryTopToolbarSection.sortByDropdown}}" userInput="{{sortBy}}" stepKey="selectSortByParameter"/>
19+
</actionGroup>
20+
<actionGroup name="StorefrontCategoryPageSortAscendingActionGroup">
21+
<annotations>
22+
<description>Set Ascending Direction for sorting Products on Category page</description>
23+
</annotations>
24+
<click selector="{{StorefrontCategoryTopToolbarSection.sortDirectionAsc}}" stepKey="setAscendingDirection"/>
25+
</actionGroup>
26+
<actionGroup name="StorefrontCategoryPageSortDescendingActionGroup">
27+
<annotations>
28+
<description>Set Descending Direction for sorting Products on Category page</description>
29+
</annotations>
30+
<click selector="{{StorefrontCategoryTopToolbarSection.sortDirectionDesc}}" stepKey="setDescendingDirection"/>
31+
</actionGroup>
32+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,14 @@
117117
<data key="is_active">true</data>
118118
<data key="include_in_menu">true</data>
119119
</entity>
120+
<entity name="DefaultCategory" type="category">
121+
<data key="name">Default Category</data>
122+
</entity>
123+
<!-- Category from file "export_import_configurable_product.csv" -->
124+
<entity name="CategoryExportImport" extends="SimpleSubCategory" type="category">
125+
<data key="name">CategoryExportImport</data>
126+
</entity>
127+
<entity name="SubCategoryNonAnchor" extends="SubCategoryWithParent">
128+
<requiredEntity type="custom_attribute">CustomAttributeCategoryNonAnchor</requiredEntity>
129+
</entity>
120130
</entities>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,8 @@
5151
<data key="attribute_code">short_description</data>
5252
<data key="value">Short Fixedtest 555</data>
5353
</entity>
54+
<entity name="CustomAttributeCategoryNonAnchor" type="custom_attribute">
55+
<data key="attribute_code">is_anchor</data>
56+
<data key="value">0</data>
57+
</entity>
5458
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/FrontendLabelData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020
<data key="store_id">0</data>
2121
<data key="label" unique="suffix">attributeThree</data>
2222
</entity>
23+
<entity name="ProductAttributeFrontendLabelForExportImport" type="FrontendLabel">
24+
<data key="store_id">0</data>
25+
<data key="label">attributeExportImport</data>
26+
</entity>
2327
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ImageContentData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818
<data key="type">image/png</data>
1919
<data key="name" unique="prefix">magento-logo.png</data>
2020
</entity>
21+
<entity name="MagentoLogoImageContentExportImport" extends="MagentoLogoImageContent" type="ImageContent">
22+
<data key="name">magento-logo.png</data>
23+
</entity>
2124
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,4 +376,9 @@
376376
<data key="frontend_label">Size</data>
377377
<data key="attribute_code" unique="suffix">size_attr</data>
378378
</entity>
379+
<!-- Product attribute from file "export_import_configurable_product.csv" -->
380+
<entity name="ProductAttributeWithTwoOptionsForExportImport" extends="productAttributeDropdownTwoOptions" type="ProductAttribute">
381+
<data key="attribute_code">attribute</data>
382+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabelForExportImport</requiredEntity>
383+
</entity>
379384
</entities>

0 commit comments

Comments
 (0)