|
| 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="StorefrontShoppingCartGuestCheckoutDisabledTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Backend"/> |
| 14 | + <stories value="Modal window for Sign In is shown if Guest checkout is disabled. "/> |
| 15 | + <title value="Modal window for Sign In is shown if Guest checkout is disabled."/> |
| 16 | + <description value="Modal window for Sign In is shown if Guest checkout is disabled. Flow from Shopping Cart"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-27419"/> |
| 19 | + <group value="module-checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 23 | + <!-- create category and simple product --> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
| 28 | + <!--Goto Admin Configuration page and Allow Guest Checkout is No--> |
| 29 | + <actionGroup ref="AdminConfigurationAllowGuestCheckoutNoNavigateActionGroup" stepKey="storeConfigurationAllowGuestCheckoutNo"/> |
| 30 | + <actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="clickOnSaveConfig"/> |
| 31 | + <!-- create customer and clean the cache and index--> |
| 32 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 33 | + <comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/> |
| 34 | + <comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/> |
| 35 | + </before> |
| 36 | + <!-- Goto storefront and add product to cart--> |
| 37 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="onCategoryPage"/> |
| 38 | + <waitForPageLoad stepKey="waitForPageLoad6"/> |
| 39 | + <actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/> |
| 40 | + <actionGroup ref="StorefrontClickAddToCartButtonActionGroup" stepKey="addToCart"/> |
| 41 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> |
| 42 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> |
| 43 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> |
| 44 | + <!-- Checkout form mini cart--> |
| 45 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMiniCart"/> |
| 46 | + <!-- click on Place Order and Guest sing in --> |
| 47 | + <actionGroup ref="StorefrontGuestSignInActionGroup" stepKey="singInForPlaceOrder"> |
| 48 | + <argument name="email" value="$$createCustomer.email$$"/> |
| 49 | + <argument name="password" value="$$createCustomer.password$$"/> |
| 50 | + </actionGroup> |
| 51 | + <amOnPage url="{{AdminLoginPage.url}}" stepKey="onLoginPage"/> |
| 52 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingPage"/> |
| 53 | + |
| 54 | + <after> |
| 55 | + <!--Goto Admin Configuration page and Allow Guest Checkout is Yes--> |
| 56 | + <actionGroup ref="AdminConfigurationAllowGuestCheckoutYesNavigateActionGroup" stepKey="storeConfigurationAllowGuestCheckoutYes"/> |
| 57 | + <actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="clickOnSaveConfigAgain"/> |
| 58 | + <!-- Delete created category, product and customer--> |
| 59 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 60 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 61 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 62 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 63 | + </after> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments