Skip to content

Commit 761a48b

Browse files
committed
magento/partners-magento2b2b#370: [Determine Coverage]: Add Meaningful Titles and Descriptions For All MFTF Tests in the Company, CompanyCredit, CompanyPayment, CompanyShipping, & ConfigurableSharedCatalog Modules
- Updating AdminSetActiveCustomerGridWorkCorrectTest
1 parent f89383a commit 761a48b

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSetCustomerActiveViaGridActionGroup">
12+
<annotations>
13+
<description>Sets a Customer to the Active status from the admin All Customers grid</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customerEmail" type="string" defaultValue="{{Simple_US_CA_Customer.email}}"/>
17+
</arguments>
18+
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" stepKey="waitForCustomerRow"/>
19+
<click selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" stepKey="selectCustomer"/>
20+
<click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/>
21+
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.setActive}}" stepKey="waitForDropDownOpen"/>
22+
<click selector="{{AdminCustomerGridMainActionsSection.setActive}}" stepKey="clickSetActive"/>
23+
<waitForPageLoad stepKey="waitForLoad"/>
24+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) were updated." stepKey="seeSuccessMessage"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminSetCustomerInactiveViaGridActionGroup" extends="AdminSetCustomerActiveViaGridActionGroup">
12+
<annotations>
13+
<description>Sets a Customer to the Inactive status from the admin All Customers grid</description>
14+
</annotations>
15+
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.setInactive}}" stepKey="waitForDropDownOpen"/>
16+
<click selector="{{AdminCustomerGridMainActionsSection.setInactive}}" stepKey="clickSetActive"/>
17+
</actionGroup>
18+
</actionGroups>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
<element name="ok" type="button" selector="//button[@data-role='action']//span[text()='OK']"/>
1818
<element name="addNewAddress" type="button" selector=".add-new-address-button" timeout="30"/>
1919
<element name="actions" type="text" selector=".admin__data-grid-header-row .action-select"/>
20+
<element name="setActive" type="button" selector="//*[contains(@class, 'admin__data-grid-header')]//span[contains(@class,'action-menu-item') and text()='Set Active']" timeout="30"/>
21+
<element name="setInactive" type="button" selector="//*[contains(@class, 'admin__data-grid-header')]//span[contains(@class,'action-menu-item') and text()='Set Inactive']" timeout="30"/>
2022
</section>
2123
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<element name="customerEditLinkByEmail" type="text" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//a[@class='action-menu-item']" parameterized="true" timeout="30"/>
1818
<element name="customerGroupByEmail" type="text" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//div[text()='{{customerGroup}}']" parameterized="true"/>
1919
<element name="customerGenderByEmail" type="text" selector="//tr[@class='data-row']//div[text()='{{customerEmail}}']/ancestor::tr/td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Gender')]/preceding-sibling::th) +1]" parameterized="true"/>
20+
<element name="status" type="text" selector="//tr[@class='data-row' and //div[text()='{{customerEmail}}']]//div[contains(text(), '{{status}}')]" parameterized="true" timeout="30"/>
2021
</section>
2122
</sections>
2223

0 commit comments

Comments
 (0)