Skip to content

Commit 43cca51

Browse files
MFTF test added
1 parent 4f2d8de commit 43cca51

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-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="StorefrontAssertLoginAsCustomerBannerVisibleActionGroup">
12+
<annotations>
13+
<description>Assert Login As Customer Banner is sticky</description>
14+
</annotations>
15+
16+
<seeElement selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="verifyBannerIsVisibleBeforeScroll"/>
17+
<scrollTo selector="{{StorefrontCustomerLoginAsCustomerSection.copyright}}" stepKey="scrollToEndOfThePage" />
18+
<seeElement selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="verifyBannerIsVisibleAfterScroll"/>
19+
</actionGroup>
20+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="StorefrontLoginToCustomerActionGroup">
12+
<annotations>
13+
<description>Login to customer account using Login As customer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customerId" type="string"/>
17+
</arguments>
18+
19+
<amOnPage url="admin/loginascustomer/login/login/customer_id/{{customerId}}/" stepKey="loginAsCustomer"/>
20+
<waitForElementVisible selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="waitForLoginAsCustomerPageLoad"/>
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="StorefrontCustomerLoginAsCustomerSection">
12+
<element name="loginAsCustomerBanner" type="text" selector=".lac-notification-sticky" timeout="30"/>
13+
<element name="copyright" type="text" selector=".copyright" timeout="30"/>
14+
</section>
15+
</sections>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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="StorefrontLoginAsCustomerBannerTest">
12+
<annotations>
13+
<features value="StorefrontLoginAsCustomerBanner"/>
14+
<stories value="User login as customer and verify banner is sticky"/>
15+
<useCaseId value="https://github.com/magento/magento2/issues/29354"/>
16+
<title value="User login as customer and verify banner is sticky"/>
17+
<testCaseId value=""/>
18+
<description value="User login as customer and verify banner is sticky"/>
19+
<severity value="CRITICAL"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
24+
</before>
25+
26+
<after>
27+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer" />
28+
</after>
29+
30+
<actionGroup ref="StorefrontLoginToCustomerActionGroup" stepKey="LoginAsCustomer">
31+
<argument name="customerId" value="$$createCustomer.id$$"/>
32+
</actionGroup>
33+
<actionGroup ref="StorefrontAssertLoginAsCustomerBannerVisibleActionGroup" stepKey="assertBannerIsSticky" />
34+
</test>
35+
</tests>

0 commit comments

Comments
 (0)