|
| 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="StorefrontModalWindowForSignInIsShownIfGuestCheckoutIsDisabledTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Backend"/> |
| 14 | + <stories value="Modal window for Sign In is shown if Guest checkout is disabled. Flow from mini cart."/> |
| 15 | + <title value="Modal window for Sign In is shown if Guest checkout is disabled. Flow from mini cart"/> |
| 16 | + <description value="Modal window for Sign In is shown if Guest checkout is disabled. Flow from mini cart."/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="AC-4130"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- create category and simple product --> |
| 22 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + </createData> |
| 26 | + <!--Goto Admin Configuration page and Allow Guest Checkout is No--> |
| 27 | + <createData entity="DisableAllowGuestCheckout" stepKey="storeConfigurationAllowGuestCheckoutNo"> |
| 28 | + </createData> |
| 29 | + <!-- create customer and clean the cache and index--> |
| 30 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <!--Goto Admin Configuration page and Allow Guest Checkout is Yes--> |
| 34 | + <createData entity="EnableAllowGuestCheckout" stepKey="storeConfigurationAllowGuestCheckoutYes"> |
| 35 | + </createData> |
| 36 | + <!-- Delete created category, product and customer--> |
| 37 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 38 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 39 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 40 | + </after> |
| 41 | + |
| 42 | + <!--Open product in storefront--> |
| 43 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPageOnStorefront"/> |
| 44 | + <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/> |
| 45 | + |
| 46 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"> |
| 47 | + <argument name="product" value="$$createProduct$$"/> |
| 48 | + </actionGroup> |
| 49 | + |
| 50 | + <!-- Checkout form mini cart--> |
| 51 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMiniCart"/> |
| 52 | + |
| 53 | + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="AssertEmailidFieldisPresent"/> |
| 54 | + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.password}}" stepKey="AssertPasswordFieldisPresent"/> |
| 55 | + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="AssertcreateAnAccountButtonisPresent"/> |
| 56 | + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.forgotYourPassword}}" stepKey="AssertforgotYourPasswordLinkisPresent"/> |
| 57 | + |
| 58 | + <!-- click on Place Order and Guest sing in --> |
| 59 | + <actionGroup ref="StorefrontGuestSignInActionGroup" stepKey="singInForPlaceOrder"> |
| 60 | + <argument name="email" value="$$createCustomer.email$$"/> |
| 61 | + <argument name="password" value="$$createCustomer.password$$"/> |
| 62 | + </actionGroup> |
| 63 | + |
| 64 | + <seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/> |
| 65 | + </test> |
| 66 | +</tests> |
0 commit comments