|
| 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="StorefrontCustomerLoginDuringCheckoutTest"> |
| 12 | + <annotations> |
| 13 | + <features value="OnePageCheckout"/> |
| 14 | + <stories value="Customer Login during checkout"/> |
| 15 | + <title value="Storefront customer login during checkout test"/> |
| 16 | + <description value="Logging during checkout for customer without addresses in address book"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-13097"/> |
| 19 | + <group value="OnePageCheckout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create simple product --> |
| 23 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 24 | + |
| 25 | + <!-- Login as admin --> |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <!-- Delete simple product --> |
| 30 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 31 | + |
| 32 | + <!-- Customer log out --> |
| 33 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 34 | + |
| 35 | + <!-- Delete customer --> |
| 36 | + <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> |
| 37 | + <argument name="customerEmail" value="CustomerEntityOne.email"/> |
| 38 | + </actionGroup> |
| 39 | + |
| 40 | + <!-- Logout admin --> |
| 41 | + <actionGroup ref="logout" stepKey="logout"/> |
| 42 | + </after> |
| 43 | + <!-- Go to Storefront as Guest and create new account --> |
| 44 | + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createNewCustomerAccount"/> |
| 45 | + |
| 46 | + <!-- Sign Out --> |
| 47 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 48 | + |
| 49 | + <!-- Add simple product to cart as Guest --> |
| 50 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
| 51 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 52 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> |
| 53 | + <argument name="product" value="$$createProduct$$"/> |
| 54 | + <argument name="productCount" value="1"/> |
| 55 | + </actionGroup> |
| 56 | + |
| 57 | + <!-- Go to Checkout page --> |
| 58 | + <actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/> |
| 59 | + <click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> |
| 60 | + <waitForPageLoad stepKey="waitForProceedToCheckout"/> |
| 61 | + |
| 62 | + <!-- Input in field email and password for newly created customer; click Login button --> |
| 63 | + <actionGroup ref="LoginAsCustomerOnCheckoutPageActionGroup" stepKey="customerLogin"> |
| 64 | + <argument name="customer" value="CustomerEntityOne"/> |
| 65 | + </actionGroup> |
| 66 | + |
| 67 | + <!-- Shipping form is pre-filed with first name and last name --> |
| 68 | + <seeInField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="seeCustomerFirstNameInField"/> |
| 69 | + <seeInField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeCustomerLastNameInField"/> |
| 70 | + </test> |
| 71 | +</tests> |
0 commit comments