-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Magento Community Engineering] Community Contributions - 2.4-develop
- merged latest code from mainline branch
- Loading branch information
Showing
27 changed files
with
313 additions
and
315 deletions.
There are no files selected for viewing
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
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
33 changes: 33 additions & 0 deletions
33
...t/Mftf/ActionGroup/AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup.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,33 @@ | ||
<?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="AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup"> | ||
<annotations> | ||
<description>Verify Sticky Login as Customer notification banner present on page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="customerFullName" type="string"/> | ||
<argument name="websiteName" type="string" defaultValue="Main Website"/> | ||
</arguments> | ||
|
||
<waitForElementVisible selector="{{StorefrontLoginAsCustomerNotificationSection.notificationText}}" stepKey="waitForNotificationBanner"/> | ||
<see selector="{{StorefrontLoginAsCustomerNotificationSection.notificationText}}" | ||
userInput="You are connected as {{customerFullName}} on {{websiteName}}" | ||
stepKey="assertCorrectNotificationBannerMessage"/> | ||
<seeElement selector="{{StorefrontLoginAsCustomerNotificationSection.closeLink}}" | ||
stepKey="assertCloseNotificationBannerPresent"/> | ||
<executeJS function="window.scrollTo(0,document.body.scrollHeight);" stepKey="scrollToBottomOfPage"/> | ||
<see selector="{{StorefrontLoginAsCustomerNotificationSection.notificationText}}" | ||
userInput="You are connected as {{customerFullName}} on {{websiteName}}" | ||
stepKey="assertCorrectNotificationBannerMessageAfterScroll"/> | ||
<seeElement selector="{{StorefrontLoginAsCustomerNotificationSection.closeLink}}" | ||
stepKey="assertCloseNotificationBannerPresentAfterScroll"/> | ||
</actionGroup> | ||
</actionGroups> |
52 changes: 52 additions & 0 deletions
52
.../LoginAsCustomer/Test/Mftf/Test/StorefrontStickyLoginAsCustomerNotificationBannerTest.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,52 @@ | ||
<?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="StorefrontStickyLoginAsCustomerNotificationBannerTest"> | ||
<annotations> | ||
<features value="Login as Customer"/> | ||
<useCaseId value="https://github.com/magento/magento2/issues/29354"/> | ||
<stories value="Availability of sticky UI elements if module enable/disable"/> | ||
<title value="Sticky Notification Banner is present on Storefront page"/> | ||
<description | ||
value="Verify that Sticky Notification Banner is present on page if 'Login as customer' functionality used"/> | ||
<testCaseId value=""/> | ||
<group value="login_as_customer"/> | ||
<severity value="CRITICAL"/> | ||
</annotations> | ||
<before> | ||
<magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1" | ||
stepKey="enableLoginAsCustomer"/> | ||
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCache"> | ||
<argument name="tags" value="config"/> | ||
</actionGroup> | ||
<createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createCustomer"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/> | ||
</before> | ||
|
||
<after> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 0" | ||
stepKey="disableLoginAsCustomer"/> | ||
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCache"> | ||
<argument name="tags" value="config"/> | ||
</actionGroup> | ||
</after> | ||
|
||
<actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup" stepKey="loginAsCustomerFromCustomerPage"> | ||
<argument name="customerId" value="$$createCustomer.id$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup" stepKey="assertStickyNotificationBanner"> | ||
<argument name="customerFullName" value="$$createCustomer.firstname$$ $$createCustomer.lastname$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontSignOutNotificationBannerAndCloseTabActionGroup" stepKey="signOutAndCloseTab"/> | ||
</test> | ||
</tests> |
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
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
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
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
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
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
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
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
Oops, something went wrong.