Skip to content

Commit a86a292

Browse files
MC-39761: Opt-in checkbox is not displayed on Edit Account Information page.
1 parent eaa1cdc commit a86a292

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="StorefrontAssertLoginAssistanceAllowedCheckboxCheckedActionGroup">
12+
<annotations>
13+
<description>Verify "Allow remote shopping assistance" checkbox present on page and checked.</description>
14+
</annotations>
15+
16+
<waitForElement selector="{{StorefrontCustomerAccountInformationSection.allowAssistance}}" stepKey="waitForAllowAssistanceCheckbox"/>
17+
<seeCheckboxIsChecked selector="{{StorefrontCustomerAccountInformationSection.allowAssistance}}"
18+
stepKey="assertAllowAssistanceCheckboxChecked"/>
19+
</actionGroup>
20+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="StorefrontAssertLoginAssistanceAllowedCheckboxUncheckedActionGroup">
12+
<annotations>
13+
<description>Verify "Allow remote shopping assistance" checkbox present on page and unchecked.</description>
14+
</annotations>
15+
16+
<waitForElement selector="{{StorefrontCustomerAccountInformationSection.allowAssistance}}" stepKey="waitForAllowAssistanceCheckbox"/>
17+
<dontSeeCheckboxIsChecked selector="{{StorefrontCustomerAccountInformationSection.allowAssistance}}"
18+
stepKey="assertAllowAssistanceCheckboxUnchecked"/>
19+
</actionGroup>
20+
</actionGroups>
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="StorefrontCustomerAccountInformationSection">
12+
<element name="allowAssistance" type="checkbox" selector=".form-edit-account input[name='assistance_allowed_checkbox']"/>
13+
</section>
14+
</sections>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="AdminLoginAsCustomerAssistanceCheckboxTest">
12+
<annotations>
13+
<features value="Login as Customer"/>
14+
<stories value="Opt in/out"/>
15+
<title value="Login as Customer assistance checkbox test"/>
16+
<description
17+
value="Verify that 'Allow remote shopping assistance' checkbox is present on Edit Account Information page"/>
18+
<severity value="CRITICAL"/>
19+
<group value="login_as_customer"/>
20+
</annotations>
21+
<before>
22+
<magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1"
23+
stepKey="enableLoginAsCustomer"/>
24+
<magentoCLI command="config:set {{LoginAsCustomerStoreViewLogin.path}} 0"
25+
stepKey="enableLoginAsCustomerAutoDetection"/>
26+
<createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createFirstCustomer"/>
27+
<createData entity="Simple_US_Customer" stepKey="createSecondCustomer"/>
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultUser"/>
29+
</before>
30+
<after>
31+
<deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/>
32+
<deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/>
33+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAfter"/>
34+
</after>
35+
<!-- Login into First Customer account -->
36+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsFirstCustomer">
37+
<argument name="Customer" value="$createFirstCustomer$"/>
38+
</actionGroup>
39+
40+
<!-- Open My Account > Order by SKU -->
41+
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToFirstMyAccountPage"/>
42+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="openFirstAccountInformation">
43+
<argument name="menu" value="Account Information"/>
44+
</actionGroup>
45+
46+
<!-- Assert Assistance checkbox is present and checked -->
47+
<actionGroup ref="StorefrontAssertLoginAssistanceAllowedCheckboxCheckedActionGroup"
48+
stepKey="assertAssistanceAllowedCheckboxChecked"/>
49+
50+
<!-- Logout customer -->
51+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutFirstCustomer"/>
52+
53+
<!-- Login into Second Customer account -->
54+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsSecondCustomer">
55+
<argument name="Customer" value="$createSecondCustomer$"/>
56+
</actionGroup>
57+
58+
<!-- Open My Account > Order by SKU -->
59+
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToSecondMyAccountPage"/>
60+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="openSecondAccountInformation">
61+
<argument name="menu" value="Account Information"/>
62+
</actionGroup>
63+
64+
<!-- Assert Assistance checkbox is present and unchecked -->
65+
<actionGroup ref="StorefrontAssertLoginAssistanceAllowedCheckboxUncheckedActionGroup"
66+
stepKey="assertAssistanceAllowedCheckboxUnchecked"/>
67+
</test>
68+
</tests>

0 commit comments

Comments
 (0)