-
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.
Merge pull request #156 from magento-pangolin/MC-8120
MC-8120 Backport for MC-13097
- Loading branch information
Showing
8 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.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,27 @@ | ||
<?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="LoginAsCustomerOnCheckoutPageActionGroup"> | ||
<arguments> | ||
<argument name="customer" type="entity"/> | ||
</arguments> | ||
<waitForPageLoad stepKey="waitForCheckoutShippingSectionToLoad"/> | ||
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{customer.email}}" stepKey="fillEmailField"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.password}}" stepKey="waitForElementVisible"/> | ||
<fillField selector="{{CheckoutShippingSection.password}}" userInput="{{customer.password}}" stepKey="fillPasswordField"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.loginButton}}" stepKey="waitForLoginButtonVisible"/> | ||
<doubleClick selector="{{CheckoutShippingSection.loginButton}}" stepKey="clickLoginBtn"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear3"/> | ||
<waitForPageLoad stepKey="waitToBeLoggedIn"/> | ||
<waitForElementNotVisible selector="{{CheckoutShippingSection.email}}" stepKey="waitForEmailInvisible"/> | ||
</actionGroup> | ||
</actionGroups> |
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
71 changes: 71 additions & 0 deletions
71
app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.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,71 @@ | ||
<?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="StorefrontCustomerLoginDuringCheckoutTest"> | ||
<annotations> | ||
<features value="OnePageCheckout"/> | ||
<stories value="Customer Login during checkout"/> | ||
<title value="Storefront customer login during checkout test"/> | ||
<description value="Logging during checkout for customer without addresses in address book"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-8120"/> | ||
<group value="OnePageCheckout"/> | ||
</annotations> | ||
<before> | ||
<!-- Create simple product --> | ||
<createData entity="SimpleProduct3" stepKey="createProduct"/> | ||
|
||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!-- Delete simple product --> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
|
||
<!-- Customer log out --> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> | ||
|
||
<!-- Delete customer --> | ||
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> | ||
<argument name="customerEmail" value="CustomerEntityOne.email"/> | ||
</actionGroup> | ||
|
||
<!-- Logout admin --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
<!-- Go to Storefront as Guest and create new account --> | ||
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createNewCustomerAccount"/> | ||
|
||
<!-- Sign Out --> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> | ||
|
||
<!-- Add simple product to cart as Guest --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> | ||
<argument name="product" value="$$createProduct$$"/> | ||
<argument name="productCount" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Go to Checkout page --> | ||
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/> | ||
<click selector="{{StorefrontCheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> | ||
<waitForPageLoad stepKey="waitForProceedToCheckout"/> | ||
|
||
<!-- Input in field email and password for newly created customer; click Login button --> | ||
<actionGroup ref="LoginAsCustomerOnCheckoutPageActionGroup" stepKey="customerLogin"> | ||
<argument name="customer" value="CustomerEntityOne"/> | ||
</actionGroup> | ||
|
||
<!-- Shipping form is pre-filed with first name and last name --> | ||
<seeInField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="seeCustomerFirstNameInField"/> | ||
<seeInField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeCustomerLastNameInField"/> | ||
</test> | ||
</tests> |
25 changes: 25 additions & 0 deletions
25
app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminDeleteCustomerActionGroup.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,25 @@ | ||
<?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="AdminDeleteCustomerActionGroup"> | ||
<arguments> | ||
<argument name="customerEmail"/> | ||
</arguments> | ||
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomersPage"/> | ||
<conditionalClick selector="{{AdminCustomerFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerFiltersSection.clearAll}}" visible="true" stepKey="clickClearFilters"/> | ||
<click stepKey="chooseCustomer" selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}"/> | ||
<click stepKey="openActions" selector="{{AdminCustomerGridMainActionsSection.actions}}"/> | ||
<waitForPageLoad stepKey="waitActions"/> | ||
<click stepKey="delete" selector="{{AdminCustomerGridMainActionsSection.delete}}"/> | ||
<waitForPageLoad stepKey="waitForConfirmationAlert"/> | ||
<click stepKey="accept" selector="{{AdminCustomerGridMainActionsSection.ok}}"/> | ||
<waitForPageLoad stepKey="waitForDelete"/> | ||
<see stepKey="seeSuccessMessage" userInput="were deleted."/> | ||
</actionGroup> | ||
</actionGroups> |
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerLogoutActionGroup.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,21 @@ | ||
<?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="StorefrontCustomerLogoutActionGroup"> | ||
<amOnPage url="{{StorefrontCustomerLogoutPage.url}}" stepKey="storefrontSignOut"/> | ||
</actionGroup> | ||
|
||
<actionGroup name="StorefrontSignOutActionGroup"> | ||
<click selector="{{StoreFrontSignOutSection.customerAccount}}" stepKey="clickCustomerButton"/> | ||
<click selector="{{StoreFrontSignOutSection.signOut}}" stepKey="clickToSignOut"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<see userInput="You are signed out" stepKey="signOut"/> | ||
</actionGroup> | ||
</actionGroups> |
11 changes: 11 additions & 0 deletions
11
app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerLogoutPage.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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="StorefrontCustomerLogoutPage" url="customer/account/logout/" area="storefront" module="Magento_Customer"/> | ||
</pages> |
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