Skip to content

Commit 9677540

Browse files
MFTF test action groups modified
1 parent 0fa58ee commit 9677540

9 files changed

+104
-38
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AssertCustomerEditFormPasswordFieldActionGroup">
12+
<annotations>
13+
<description>Validate the password is visible as plain text in customer account edit form.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="passwordFieldType" type="string" defaultValue="text"/>
17+
</arguments>
18+
19+
<assertElementContainsAttribute stepKey="assertCurrentPasswordFieldType">
20+
<expectedResult selector="{{StorefrontCustomerAccountInformationSection.currentPassword}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
21+
</assertElementContainsAttribute>
22+
<assertElementContainsAttribute stepKey="assertNewPasswordFieldType">
23+
<expectedResult selector="{{StorefrontCustomerAccountInformationSection.newPassword}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
24+
</assertElementContainsAttribute>
25+
<assertElementContainsAttribute stepKey="assertConfirmNewPasswordFieldType">
26+
<expectedResult selector="{{StorefrontCustomerAccountInformationSection.confirmNewPassword}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
27+
</assertElementContainsAttribute>
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertPasswordFieldActionGroup.xml renamed to app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertLoginFormPasswordFieldActionGroup.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AssertPasswordFieldActionGroup">
11+
<actionGroup name="AssertLoginFormPasswordFieldActionGroup">
1212
<annotations>
13-
<description>Validate the password is visible as plain text.</description>
13+
<description>Validate the password is visible as plain text in login form.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="fieldSelector" type="string"/>
1716
<argument name="passwordFieldType" type="string" defaultValue="text"/>
1817
</arguments>
1918

2019
<assertElementContainsAttribute stepKey="assertPasswordFieldType">
21-
<expectedResult selector="{{fieldSelector}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
20+
<expectedResult selector="{{StorefrontCustomerSignInFormSection.passwordField}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
2221
</assertElementContainsAttribute>
2322
</actionGroup>
2423
</actionGroups>
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="AssertRegistrationFormPasswordFieldActionGroup">
12+
<annotations>
13+
<description>Validate the password is visible as plain text on customer registration form.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="passwordFieldType" type="string" defaultValue="text"/>
17+
</arguments>
18+
19+
<assertElementContainsAttribute stepKey="assertPasswordFieldType">
20+
<expectedResult selector="{{StorefrontCustomerCreateFormSection.passwordField}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
21+
</assertElementContainsAttribute>
22+
<assertElementContainsAttribute stepKey="assertConfirmPasswordFieldType">
23+
<expectedResult selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}" attribute="type" type="string">{{passwordFieldType}}</expectedResult>
24+
</assertElementContainsAttribute>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontClickShowPasswordActionGroup.xml renamed to app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerEditFormClickShowPasswordActionGroup.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="StorefrontClickShowPasswordActionGroup">
11+
<actionGroup name="StorefrontCustomerEditFormClickShowPasswordActionGroup">
1212
<annotations>
13-
<description>Click on the show password checkbox</description>
13+
<description>Click on the show password checkbox in customer account information form</description>
1414
</annotations>
15-
<arguments>
16-
<argument name="fieldSelector" type="string"/>
17-
</arguments>
18-
19-
<click stepKey="clickShowPasswordCheckbox" selector="{{fieldSelector}}"/>
15+
16+
<click stepKey="clickShowPasswordCheckbox" selector="{{StorefrontCustomerAccountInformationSection.showPasswordCheckbox}}"/>
2017
</actionGroup>
2118
</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="StorefrontLoginFormClickShowPasswordActionGroup">
12+
<annotations>
13+
<description>Click on the show password checkbox in login form</description>
14+
</annotations>
15+
16+
<click stepKey="clickShowPasswordCheckbox" selector="{{StorefrontCustomerSignInFormSection.showPasswordCheckbox}}"/>
17+
</actionGroup>
18+
</actionGroups>
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="StorefrontRegistrationFormClickShowPasswordActionGroup">
12+
<annotations>
13+
<description>Click on the show password checkbox in registration form</description>
14+
</annotations>
15+
16+
<click stepKey="clickShowPasswordCheckbox" selector="{{StorefrontCustomerCreateFormSection.showPasswordCheckbox}}"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontChangePasswordFormShowPasswordTest.xml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,7 @@
3333
<actionGroup ref="StorefrontFillChangePasswordFormActionGroup" stepKey="fillChangePasswordForm">
3434
<argument name="customer" value="Simple_US_Customer"/>
3535
</actionGroup>
36-
<actionGroup ref="StorefrontClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox">
37-
<argument name="fieldSelector" value="{{StorefrontCustomerAccountInformationSection.showPasswordCheckbox}}"/>
38-
</actionGroup>
39-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertCurrentPasswordField">
40-
<argument name="fieldSelector" value="{{StorefrontCustomerAccountInformationSection.currentPassword}}" />
41-
</actionGroup>
42-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertNewPasswordField">
43-
<argument name="fieldSelector" value="{{StorefrontCustomerAccountInformationSection.newPassword}}" />
44-
</actionGroup>
45-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertNewConfirmPasswordField">
46-
<argument name="fieldSelector" value="{{StorefrontCustomerAccountInformationSection.confirmNewPassword}}" />
47-
</actionGroup>
36+
<actionGroup ref="StorefrontCustomerEditFormClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox"/>
37+
<actionGroup ref="AssertCustomerEditFormPasswordFieldActionGroup" stepKey="AssertCurrentPasswordField"/>
4838
</test>
4939
</tests>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerFormShowPasswordTest.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@
2222
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
2323
<argument name="customer" value="Simple_US_Customer"/>
2424
</actionGroup>
25-
<actionGroup ref="StorefrontClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox">
26-
<argument name="fieldSelector" value="{{StorefrontCustomerCreateFormSection.showPasswordCheckbox}}"/>
27-
</actionGroup>
28-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertPasswordField">
29-
<argument name="fieldSelector" value="{{StorefrontCustomerCreateFormSection.passwordField}}" />
30-
</actionGroup>
31-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertConfirmPasswordField">
32-
<argument name="fieldSelector" value="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}" />
33-
</actionGroup>
25+
<actionGroup ref="StorefrontRegistrationFormClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox"/>
26+
<actionGroup ref="AssertRegistrationFormPasswordFieldActionGroup" stepKey="AssertPasswordField"/>
3427
</test>
3528
</tests>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
<actionGroup ref="StorefrontFillCustomerLoginFormWithWrongPasswordActionGroup" stepKey="fillLoginFormWithCustomerData">
2929
<argument name="customer" value="$$customer$$"/>
3030
</actionGroup>
31-
<actionGroup ref="StorefrontClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox">
32-
<argument name="fieldSelector" value="{{StorefrontCustomerSignInFormSection.showPasswordCheckbox}}"/>
33-
</actionGroup>
34-
<actionGroup ref="AssertPasswordFieldActionGroup" stepKey="AssertPasswordField">
35-
<argument name="fieldSelector" value="{{StorefrontCustomerSignInFormSection.passwordField}}" />
36-
</actionGroup>
31+
<actionGroup ref="StorefrontLoginFormClickShowPasswordActionGroup" stepKey="clickShowPasswordCheckbox"/>
32+
<actionGroup ref="AssertLoginFormPasswordFieldActionGroup" stepKey="AssertPasswordField"/>
3733
</test>
3834
</tests>

0 commit comments

Comments
 (0)