Skip to content

Commit 89d8f80

Browse files
author
Joan He
authored
Merge pull request #3104 from magento-tsg/2.3-develop-mftf-pr4
[TSG] MFTF for 2.3 (pr4) (2.3.0)
2 parents 0eb8677 + 96cb0bb commit 89d8f80

File tree

17 files changed

+265
-1
lines changed

17 files changed

+265
-1
lines changed
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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="AdminDashboardPage" url="admin/dashboard/" area="admin" module="Magento_Backend">
12+
<section name="AdminMenuSection"/>
13+
</page>
14+
</pages>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminMenuSection">
12+
<element name="catalog" type="button" selector="#menu-magento-catalog-catalog"/>
13+
<element name="customers" type="button" selector="#menu-magento-customer-customer"/>
14+
<element name="content" type="button" selector="#menu-magento-backend-content"/>
15+
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
16+
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
17+
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
18+
</section>
19+
</sections>

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

100644100755
File mode changed.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
<argument name="simpleProduct"/>
122122
</arguments>
123123
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
124+
<waitForPageLoad stepKey="waitForPageLoad"/>
124125
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
125126
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
126127
<fillField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>

app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml

100644100755
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,26 @@
2020
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEdit"/>
2121
<waitForPageLoad stepKey="waitForPageLoad2" />
2222
</actionGroup>
23+
<actionGroup name="DeleteCustomerFromAdminActionGroup">
24+
<arguments>
25+
<argument name="customer"/>
26+
</arguments>
27+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
28+
<waitForPageLoad stepKey="waitForPageLoad1" />
29+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
30+
<fillField selector="{{AdminDataGridHeaderSection.search}}" userInput="{{customer.email}}" stepKey="fillSearch"/>
31+
<click selector="{{AdminDataGridHeaderSection.submitSearch}}" stepKey="clickSubmit"/>
32+
<waitForAjaxLoad stepKey="waitForLoadAjax"/>
33+
<click selector="{{AdminCustomerGridMainActionsSection.multicheck}}" stepKey="selectAll"/>
34+
<click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/>
35+
<click selector="{{AdminCustomerGridMainActionsSection.delete}}" stepKey="clickDelete"/>
36+
<waitForAjaxLoad stepKey="waitForLoadConfirmation"/>
37+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/>
38+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="A total of 1 record(s) were deleted" stepKey="seeSuccess"/>
39+
</actionGroup>
40+
<actionGroup name="AdminClearCustomersFiltersActionGroup">
41+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="amOnCustomersPage"/>
42+
<waitForPageLoad stepKey="WaitForPageToLoad"/>
43+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
44+
</actionGroup>
2345
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<data key="customer_id">12</data>
1414
<requiredEntity type="region">CustomerRegionOne</requiredEntity>
1515
<data key="region_id">0</data>
16-
<data key="country_id">USA</data>
16+
<data key="country_id">US</data>
1717
<array key="street">
1818
<item>7700 W Parmer Ln</item>
1919
<item>Bld D</item>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="nameInput" type="input" selector="input[name=name]"/>
1414
<element name="emailInput" type="input" selector="input[name=email]"/>
1515
<element name="apply" type="button" selector="button[data-action=grid-filter-apply]" timeout="30"/>
16+
<element name="clearAllFilters" type="text" selector=".admin__current-filters-actions-wrap.action-clear"/>
1617
</section>
1718
</sections>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridMainActionsSection.xml

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCustomerGridMainActionsSection">
1212
<element name="addNewCustomer" type="button" selector="#add" timeout="30"/>
13+
<element name="multicheck" type="checkbox" selector="#container>div>div.admin__data-grid-wrap>table>thead>tr>th.data-grid-multicheck-cell>div>label"/>
14+
<element name="delete" type="button" selector="//*[contains(@class, 'admin__data-grid-header')]//span[contains(@class,'action-menu-item') and text()='Delete']"/>
15+
<element name="actions" type="text" selector=".action-select"/>
1316
</section>
1417
</sections>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCreateCartPriceRuleActionGroup">
11+
<arguments>
12+
<argument name="ruleName"/>
13+
</arguments>
14+
<amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/>
15+
<waitForPageLoad stepKey="waitForPriceList"/>
16+
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
17+
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ruleName.name}}" stepKey="fillRuleName"/>
18+
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{ruleName.websites}}" stepKey="selectWebsites"/>
19+
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{ruleName.customerGroups}}]" stepKey="selectCustomerGroup"/>
20+
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
21+
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{ruleName.apply}}" stepKey="selectActionType"/>
22+
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{ruleName.discountAmount}}" stepKey="fillDiscountAmount"/>
23+
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
24+
<see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
25+
</actionGroup>
26+
</actionGroups>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,11 @@
5353
<item>1</item>
5454
</array>
5555
</entity>
56+
<entity name="TestSalesRule" type="SalesRule">
57+
<data key="name" unique="suffix">TestSalesRule</data>
58+
<data key="websites">Main Website</data>
59+
<data key="customerGroups">'NOT LOGGED IN', 'General', 'Wholesale', 'Retailer'</data>
60+
<data key="apply">Percent of product price discount</data>
61+
<data key="discountAmount">50</data>
62+
</entity>
5663
</entities>

0 commit comments

Comments
 (0)