Skip to content

Commit 090b9c7

Browse files
DmitryTsymbalokolesnyk
authored andcommitted
Convert SecureChangingCustomerEmailTest to MFTF
1 parent d423667 commit 090b9c7

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="StoreFrontCustomerChangeEmailWithIncorrectActionGroup">
12+
<arguments>
13+
<argument name="email" type="string" />
14+
<argument name="password" type="string" />
15+
</arguments>
16+
<checkOption selector="{{StorefrontCustomerAccountInformationSection.changeEmail}}" stepKey="clickChangeEmailCheckbox" />
17+
<fillField selector="{{StorefrontCustomerAccountInformationSection.email}}" userInput="{{email}}" stepKey="fillEmail" />
18+
<fillField selector="{{StorefrontCustomerAccountInformationSection.currentPassword}}" userInput="11test1" stepKey="fillWrongPassword" />
19+
<click selector="{{StorefrontCustomerAccountInformationSection.saveButton}}" stepKey="saveChange" />
20+
<waitForPageLoad stepKey="waitForPageLoaded" />
21+
<see userInput="The password doesn't match this account. Verify the password and try again." stepKey="SeeTheIncorrectNotificationIsDisplayed" />
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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="SecureChangingCustomerEmailTest">
12+
<annotations>
13+
<features value="Security" />
14+
<stories value="Changing Customer's email" />
15+
<title value="Changing Customer Email Test" />
16+
<description value="Changing Customer's email with correct and wrong passwords" />
17+
<group value="security" />
18+
<group value="mtf_migrated" />
19+
</annotations>
20+
21+
<before>
22+
<createData entity="Simple_US_Customer" stepKey="customer" />
23+
</before>
24+
<after>
25+
<deleteData createDataKey="customer" stepKey="deleteCustomer" />
26+
</after>
27+
28+
<!-- TEST BODY -->
29+
<!-- Go to storefront home page -->
30+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage" />
31+
<!-- Login as created customer -->
32+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
33+
<argument name="Customer" value="$$customer$$" />
34+
</actionGroup>
35+
<!-- Navigate to "Account Information" tab First Time-->
36+
<actionGroup ref="StorefrontOpenCustomerAccountInfoEditPageActionGroup" stepKey="goToCustomerEditPageFirstTime" />
37+
<!-- Checking Email checkbox, entering new email, saving with correct password -->
38+
<actionGroup ref="StorefrontCustomerChangeEmailActionGroup" stepKey="changeEmailCorrectAttempt">
39+
<argument name="email" value="$$customer.email$$" />
40+
<argument name="password" value="$$customer.password$$" />
41+
</actionGroup>
42+
<!-- Navigate to "Account Information" tab Second Time-->
43+
<actionGroup ref="StorefrontOpenCustomerAccountInfoEditPageActionGroup" stepKey="goToCustomerEditPageSecondTime" />
44+
<!-- Checking Email checkbox, entering new email, saving with incorrect password -->
45+
<actionGroup ref="StoreFrontCustomerChangeEmailWithIncorrectActionGroup" stepKey="changeEmailWrongAttempt">
46+
<argument name="email" value="$$customer.email$$" />
47+
<argument name="password" value="{incorrect.password}" />
48+
</actionGroup>
49+
<!-- END TEST BODY -->
50+
51+
</test>
52+
</tests>

0 commit comments

Comments
 (0)