Skip to content

Commit 61e17e5

Browse files
author
Alexander Akimov
authored
Merge pull request #3816 from magento-tsg/2.3-develop-mftf-pr13
[TSG] MFTF for 2.3 (pr13) (2.3.1)
2 parents 908ed15 + 7e431c9 commit 61e17e5

File tree

19 files changed

+353
-9
lines changed

19 files changed

+353
-9
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,15 @@
263263
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
264264
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
265265
</actionGroup>
266+
267+
<actionGroup name="AdminAssignProductToCategory">
268+
<arguments>
269+
<argument name="productId" type="string"/>
270+
<argument name="categoryName" type="string"/>
271+
</arguments>
272+
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="amOnPage"/>
273+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{categoryName}}]" stepKey="selectCategory"/>
274+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
275+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/>
276+
</actionGroup>
266277
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="RelatedProductLink" type="product_link">
12+
<var key="sku" entityKey="sku" entityType="product2"/>
13+
<var key="linked_product_sku" entityKey="sku" entityType="product"/>
14+
<data key="link_type">related</data>
15+
<data key="linked_product_type">simple</data>
16+
<data key="position">1</data>
17+
<requiredEntity type="product_link_extension_attribute">Qty1000</requiredEntity>
18+
</entity>
19+
</entities>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="OneRelatedProductLink" type="product_links">
12+
<requiredEntity type="product_link">RelatedProductLink</requiredEntity>
13+
</entity>
14+
</entities>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="ProductLinkWidget" extends="ProductsListWidget">
12+
<data key="type">Catalog Product Link</data>
13+
<data key="template">Product Link Block Template</data>
14+
</entity>
15+
</entities>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminNewWidgetPage" url="admin/widget_instance/new/" area="admin" module="Magento_Widget">
12+
<section name="AdminNewWidgetSelectProductPopupSection"/>
13+
</page>
14+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminNewWidgetSection">
12+
<element name="selectProduct" type="button" selector=".btn-chooser" timeout="30"/>
13+
</section>
14+
</sections>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminNewWidgetSelectProductPopupSection">
12+
<element name="filterBySku" type="input" selector=".data-grid-filters input[name='chooser_sku']"/>
13+
<element name="firstRow" type="select" selector=".even>td" timeout="20"/>
14+
</section>
15+
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminCreateApiConfigurableProductActionGroup.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,17 @@
6262
<requiredEntity createDataKey="createConfigChildProduct2"/>
6363
</createData>
6464
</actionGroup>
65+
66+
<!-- Create the configurable product, children are not visible individually -->
67+
<actionGroup name="AdminCreateApiConfigurableProductWithHiddenChildActionGroup" extends="AdminCreateApiConfigurableProductActionGroup">
68+
<!-- Create the 2 children that will be a part of the configurable product -->
69+
<createData entity="ApiSimpleOneHidden" stepKey="createConfigChildProduct1">
70+
<requiredEntity createDataKey="createConfigProductAttribute"/>
71+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
72+
</createData>
73+
<createData entity="ApiSimpleTwoHidden" stepKey="createConfigChildProduct2">
74+
<requiredEntity createDataKey="createConfigProductAttribute"/>
75+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
76+
</createData>
77+
</actionGroup>
6578
</actionGroups>

app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleActionGroup.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,27 @@
3838
<click selector="{{AdminMainActionsSection.saveAndContinue}}" stepKey="clickSaveButton"/>
3939
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
4040
</actionGroup>
41+
42+
<actionGroup name="SetConditionForActionsInCartPriceRuleActionGroup">
43+
<arguments>
44+
<argument name="actionsAggregator" type="string" defaultValue="ANY"/>
45+
<argument name="actionsValue" type="string" defaultValue="FALSE"/>
46+
<argument name="childAttribute" type="string" defaultValue="Category"/>
47+
<argument name="actionValue" type="string"/>
48+
</arguments>
49+
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickOnActionTab"/>
50+
<click selector="{{AdminCartPriceRulesFormSection.condition('ALL')}}" stepKey="clickToChooseOption"/>
51+
<selectOption selector="{{AdminCartPriceRulesFormSection.actionsAggregator}}" userInput="{{actionsAggregator}}" stepKey="selectCondition"/>
52+
<click selector="{{AdminCartPriceRulesFormSection.condition('TRUE')}}" stepKey="clickToChooseOption2"/>
53+
<selectOption selector="{{AdminCartPriceRulesFormSection.actionsValue}}" userInput="{{actionsValue}}" stepKey="selectCondition2"/>
54+
<click selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="selectActionConditions"/>
55+
<waitForPageLoad stepKey="waitForDropDownOpened"/>
56+
<selectOption selector="{{AdminCartPriceRulesFormSection.childAttribute}}" userInput="{{childAttribute}}" stepKey="selectAttribute"/>
57+
<waitForPageLoad stepKey="waitForOperatorOpened"/>
58+
<click selector="{{AdminCartPriceRulesFormSection.condition('...')}}" stepKey="clickToChooseOption3"/>
59+
<fillField selector="{{AdminCartPriceRulesFormSection.actionValue}}" userInput="{{actionValue}}" stepKey="fillActionValue"/>
60+
<click selector="{{AdminCartPriceRulesFormSection.applyAction}}" stepKey="applyAction"/>
61+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
62+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
63+
</actionGroup>
4164
</actionGroups>

app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,8 @@
189189
<data key="uses_per_coupon">10</data>
190190
<data key="simple_free_shipping">1</data>
191191
</entity>
192+
193+
<entity name="SalesRuleNoCouponWithFixedDiscount" extends="ApiCartRule">
194+
<data key="simple_action">by_fixed</data>
195+
</entity>
192196
</entities>

0 commit comments

Comments
 (0)