-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f2d8de
commit 43cca51
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...ntendUi/Test/Mftf/ActionGroup/StorefrontAssertLoginAsCustomerBannerVisibleActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontAssertLoginAsCustomerBannerVisibleActionGroup"> | ||
<annotations> | ||
<description>Assert Login As Customer Banner is sticky</description> | ||
</annotations> | ||
|
||
<seeElement selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="verifyBannerIsVisibleBeforeScroll"/> | ||
<scrollTo selector="{{StorefrontCustomerLoginAsCustomerSection.copyright}}" stepKey="scrollToEndOfThePage" /> | ||
<seeElement selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="verifyBannerIsVisibleAfterScroll"/> | ||
</actionGroup> | ||
</actionGroups> |
22 changes: 22 additions & 0 deletions
22
.../LoginAsCustomerFrontendUi/Test/Mftf/ActionGroup/StorefrontLoginToCustomerActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontLoginToCustomerActionGroup"> | ||
<annotations> | ||
<description>Login to customer account using Login As customer.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="customerId" type="string"/> | ||
</arguments> | ||
|
||
<amOnPage url="admin/loginascustomer/login/login/customer_id/{{customerId}}/" stepKey="loginAsCustomer"/> | ||
<waitForElementVisible selector="{{StorefrontCustomerLoginAsCustomerSection.loginAsCustomerBanner}}" stepKey="waitForLoginAsCustomerPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
15 changes: 15 additions & 0 deletions
15
.../LoginAsCustomerFrontendUi/Test/Mftf/Section/StorefrontCustomerLoginAsCustomerSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="StorefrontCustomerLoginAsCustomerSection"> | ||
<element name="loginAsCustomerBanner" type="text" selector=".lac-notification-sticky" timeout="30"/> | ||
<element name="copyright" type="text" selector=".copyright" timeout="30"/> | ||
</section> | ||
</sections> |
35 changes: 35 additions & 0 deletions
35
.../Magento/LoginAsCustomerFrontendUi/Test/Mftf/Test/StorefrontLoginAsCustomerBannerTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontLoginAsCustomerBannerTest"> | ||
<annotations> | ||
<features value="StorefrontLoginAsCustomerBanner"/> | ||
<stories value="User login as customer and verify banner is sticky"/> | ||
<useCaseId value="https://github.com/magento/magento2/issues/29354"/> | ||
<title value="User login as customer and verify banner is sticky"/> | ||
<testCaseId value=""/> | ||
<description value="User login as customer and verify banner is sticky"/> | ||
<severity value="CRITICAL"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
</before> | ||
|
||
<after> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer" /> | ||
</after> | ||
|
||
<actionGroup ref="StorefrontLoginToCustomerActionGroup" stepKey="LoginAsCustomer"> | ||
<argument name="customerId" value="$$createCustomer.id$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAssertLoginAsCustomerBannerVisibleActionGroup" stepKey="assertBannerIsSticky" /> | ||
</test> | ||
</tests> |