|
| 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="AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Admin create order"/> |
| 14 | + <title value="Product in the shopping cart could be reached by admin during order creation with multi website config"/> |
| 15 | + <description value="Product in the shopping cart could be reached by admin during order creation with multi website config"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-6353"/> |
| 18 | + <group value="sales"/> |
| 19 | + <skip> |
| 20 | + <issueId value="MC-20129"/> |
| 21 | + </skip> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <magentoCLI command="config:set {{StorefrontEnableAddStoreCodeToUrls.path}} {{StorefrontEnableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlEnable"/> |
| 25 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 27 | + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> |
| 28 | + <argument name="newWebsiteName" value="{{customWebsite.name}}"/> |
| 29 | + <argument name="websiteCode" value="{{customWebsite.code}}"/> |
| 30 | + </actionGroup> |
| 31 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore"> |
| 32 | + <argument name="website" value="{{customWebsite.name}}"/> |
| 33 | + <argument name="storeGroupName" value="{{customStoreGroup.name}}"/> |
| 34 | + <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/> |
| 35 | + </actionGroup> |
| 36 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> |
| 37 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 38 | + <argument name="customStore" value="customStore"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="goToProductPageViaID" stepKey="goToProductEditPage"> |
| 41 | + <argument name="productId" value="$$createProduct.id$$"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="ProductSetWebsite" stepKey="assignProductToSecondWebsite"> |
| 44 | + <argument name="website" value="{{customWebsite.name}}"/> |
| 45 | + </actionGroup> |
| 46 | + </before> |
| 47 | + <after> |
| 48 | + <magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlDisable"/> |
| 49 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 50 | + <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> |
| 51 | + <argument name="customerEmail" value="Simple_US_Customer.email"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> |
| 54 | + <argument name="websiteName" value="{{customWebsite.name}}"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="logout" stepKey="logout"/> |
| 57 | + </after> |
| 58 | + |
| 59 | + <!--Create customer account for Second Website--> |
| 60 | + <actionGroup ref="StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup" stepKey="goToCreateCustomerPage"/> |
| 61 | + <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm"> |
| 62 | + <argument name="customer" value="Simple_US_Customer"/> |
| 63 | + </actionGroup> |
| 64 | + <actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> |
| 65 | + <actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="assertSuccessMessage"> |
| 66 | + <argument name="message" value="Thank you for registering with {{customStoreGroup.name}}." /> |
| 67 | + </actionGroup> |
| 68 | + |
| 69 | + <!--Open product page and add to cart--> |
| 70 | + <actionGroup ref="StorefrontOpenProductPageUsingStoreCodeInUrlActionGroup" stepKey="openProductPageUsingStoreCodeInUrl"> |
| 71 | + <argument name="product" value="$$createProduct$$"/> |
| 72 | + <argument name="storeView" value="customStore"/> |
| 73 | + </actionGroup> |
| 74 | + <actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProductToCart"/> |
| 75 | + |
| 76 | + <!--Create new order for existing Customer And Store--> |
| 77 | + <actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="createNewOrder"> |
| 78 | + <argument name="customer" value="Simple_US_Customer"/> |
| 79 | + <argument name="storeView" value="customStore"/> |
| 80 | + </actionGroup> |
| 81 | + |
| 82 | + <!--Assert product in Shopping cart section--> |
| 83 | + <actionGroup ref="AdminAssertProductInShoppingCartSectionActionGroup" stepKey="seeProductInShoppingCart"> |
| 84 | + <argument name="product" value="$$createProduct.name$$"/> |
| 85 | + </actionGroup> |
| 86 | + |
| 87 | + <!--Move product to the order from shopping cart--> |
| 88 | + <actionGroup ref="AdminMoveProductToItemsOrderedFromShoppingCartActionGroup" stepKey="addProductToItemsOrderedFromShoppingCart"> |
| 89 | + <argument name="product" value="$$createProduct.name$$"/> |
| 90 | + </actionGroup> |
| 91 | + |
| 92 | + <!--Fill customer address information--> |
| 93 | + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress"> |
| 94 | + <argument name="customer" value="Simple_US_Customer"/> |
| 95 | + <argument name="address" value="US_Address_TX"/> |
| 96 | + </actionGroup> |
| 97 | + |
| 98 | + <!--Select shipping method--> |
| 99 | + <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/> |
| 100 | + |
| 101 | + <!--Checkout select Check/Money Order payment--> |
| 102 | + <actionGroup ref="SelectCheckMoneyPaymentMethod" stepKey="selectCheckMoneyPayment"/> |
| 103 | + |
| 104 | + <!--Submit Order and verify information--> |
| 105 | + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> |
| 106 | + </test> |
| 107 | +</tests> |
0 commit comments