Skip to content

Commit a55759c

Browse files
MFTF update.
1 parent 72c771f commit a55759c

11 files changed

+65
-42
lines changed

app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AdminLoginAsCustomerChooseStoreViewActionGroup.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AdminLoginAsCustomerLoginFromCustomerPageActionGroup.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<amOnPage url="{{AdminEditCustomerPage.url(customerId)}}" stepKey="gotoCustomerPage"/>
2020
<waitForPageLoad stepKey="waitForCustomerPageLoad"/>
2121
<click selector="{{AdminCustomerMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLink"/>
22+
<see selector="{{AdminConfirmationModalSection.title}}" userInput="You are about to Login as Customer"
23+
stepKey="seeModal"/>
24+
<!-- TODO: Unskip after https://github.com/magento/magento2-login-as-customer/issues/137 is fixed-->
25+
<!-- <see selector="{{AdminConfirmationModalSection.message}}" userInput="Actions taken while in "Login as Customer" will affect actual customer data." stepKey="seeModalMessage"/>-->
26+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickLogin"/>
2227
<switchToNextTab stepKey="switchToNewTab"/>
2328
<waitForPageLoad stepKey="waitForPageLoad"/>
2429
</actionGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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="AdminLoginAsCustomerLoginFromCustomerPageManualChooseActionGroup">
12+
<annotations>
13+
<description>Verify Login As Customer Login action is works properly from Customer page with manual Store View choose.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customerId" type="string"/>
17+
<argument name="storeViewName" type="string" defaultValue="default"/>
18+
</arguments>
19+
20+
<amOnPage url="{{AdminEditCustomerPage.url(customerId)}}" stepKey="gotoCustomerPage"/>
21+
<waitForPageLoad stepKey="waitForCustomerPageLoad"/>
22+
<click selector="{{AdminCustomerMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLink"/>
23+
<see selector="{{AdminConfirmationModalSection.title}}" userInput="Login as Customer: Select Store View" stepKey="seeModal"/>
24+
<!-- TODO: Unskip after https://github.com/magento/magento2-login-as-customer/issues/137 is fixed-->
25+
<!-- <see selector="{{AdminConfirmationModalSection.message}}" userInput="Actions taken while in "Login as Customer" will affect actual customer data." stepKey="seeModalMessage"/>-->
26+
<selectOption selector="{{AdminLoginAsCustomerConfirmationModalSection.storeView}}" userInput="{{storeViewName}}" stepKey="selectStoreView"/>
27+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickLogin"/>
28+
<switchToNextTab stepKey="switchToNewTab"/>
29+
<waitForPageLoad stepKey="waitForPageLoad"/>
30+
</actionGroup>
31+
</actionGroups>

app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AdminLoginAsCustomerLoginFromOrderPageActionGroup.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<amOnPage url="{{AdminOrderPage.url(orderId)}}" stepKey="gotoOrderPage"/>
2020
<waitForPageLoad stepKey="waitForOrderPageLoad"/>
2121
<click selector="{{AdminOrderDetailsMainActionsSection.loginAsCustomer}}" stepKey="clickLoginAsCustomerLink"/>
22+
<see selector="{{AdminConfirmationModalSection.title}}" userInput="You are about to Login as Customer"
23+
stepKey="seeModal"/>
24+
<!-- TODO: Unskip after https://github.com/magento/magento2-login-as-customer/issues/137 is fixed-->
25+
<!-- <see selector="{{AdminConfirmationModalSection.message}}" userInput="Actions taken while in "Login as Customer" will affect actual customer data." stepKey="seeModalMessage"/>-->
26+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickLogin"/>
2227
<switchToNextTab stepKey="switchToNewTab"/>
2328
<waitForPageLoad stepKey="waitForPageLoad"/>
2429
</actionGroup>

app/code/Magento/LoginAsCustomer/Test/Mftf/Page/AdminLoginAsCustomerLogPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:/Page/etc/PageObject.xsd">
11-
<page name="AdminLoginAsCustomerLogPage" url="loginascustomer/login/" area="admin" module="Magento_LoginAsCustomer">
11+
<page name="AdminLoginAsCustomerLogPage" url="loginascustomer_log/log/index/" area="admin" module="Magento_LoginAsCustomer">
1212
<section name="AdminLoginAsCustomerLogToolbarSection"/>
1313
<section name="AdminLoginAsCustomerLogFiltersSection"/>
1414
<section name="AdminLoginAsCustomerLogGridSection"/>
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="AdminLoginAsCustomerConfirmationModalSection">
12+
<element name="storeView" type="select" selector="//select[@id='lac-confirmation-popup-store-id']"/>
13+
</section>
14+
</sections>

app/code/Magento/LoginAsCustomer/Test/Mftf/Section/AdminLoginAsCustomerLogGridSection.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminLoginAsCustomerLogGridSection">
12-
<element name="loginIdInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='login_id']" parameterized="true"/>
13-
<element name="customerIdInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='customer_id']" parameterized="true"/>
14-
<element name="customerEmailInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='email']" parameterized="true"/>
15-
<element name="adminIdInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='admin_id']" parameterized="true"/>
16-
<element name="adminNameInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='username']" parameterized="true"/>
17-
<element name="createdAtInRow" type="text" selector="//table[@class='data-grid']/tbody/tr[{{row}}]/td[@data-column='created_at']" parameterized="true"/>
12+
<element name="loginIdInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[1]" parameterized="true"/>
13+
<element name="customerIdInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[2]" parameterized="true"/>
14+
<element name="customerEmailInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[3]" parameterized="true"/>
15+
<element name="adminIdInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[4]" parameterized="true"/>
16+
<element name="adminNameInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[5]" parameterized="true"/>
17+
<element name="createdAtInRow" type="text" selector="//table[@data-role='grid']/tbody/tr[{{row}}]/td[6]" parameterized="true"/>
1818
</section>
1919
</sections>
2020

app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerAddProductToWishlistTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
<!-- Admin Login As Customer from Customer page -->
4545
<actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup"
46-
stepKey="lLoginAsCustomerFromCustomerPage">
46+
stepKey="loginAsCustomerFromCustomerPage">
4747
<argument name="customerId" value="$$createCustomer.id$$"/>
4848
</actionGroup>
4949

app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLogNotShownIfLoginAsCustomerDisabledTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<severity value="CRITICAL"/>
1818
<group value="login_as_customer"/>
1919
<skip>
20-
<issueId value="https://github.com/magento/magento2-login-as-customer/issues/71"/>
20+
<issueId value="https://github.com/magento/magento2-login-as-customer/issues/136"/>
2121
</skip>
2222
</annotations>
2323
<before>

app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseTest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@
5252
</after>
5353

5454
<!-- Login As Customer from Customer page -->
55-
<actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup"
55+
<actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageManualChooseActionGroup"
5656
stepKey="loginAsCustomerFromCustomerPage">
5757
<argument name="customerId" value="$$createCustomer.id$$"/>
58-
</actionGroup>
59-
60-
<!-- Choose custom store view -->
61-
<actionGroup ref="AdminLoginAsCustomerChooseStoreViewActionGroup" stepKey="chooseCustomStoreView">
6258
<argument name="storeViewName" value="{{customStore.name}}"/>
6359
</actionGroup>
6460

0 commit comments

Comments
 (0)