|
| 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="AdminCreateOrderCustomStoreShippingMethodTableRatesTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Shipping"/> |
| 14 | + <stories value="Shipping method Table Rates settings gets from wrong store"/> |
| 15 | + <title value="Create order on second store with shipping method Table Rates"/> |
| 16 | + <description value="Create order on second store with shipping method Table Rates"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-6411"/> |
| 19 | + <useCaseId value="MAGETWO-91702"/> |
| 20 | + <group value="shipping"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!--Create product and customer--> |
| 24 | + <comment userInput="Create product and customer" stepKey="commentCreateProductAndCustomer"/> |
| 25 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 26 | + <createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/> |
| 27 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 28 | + <!--Create website, store group and store view--> |
| 29 | + <comment userInput="Create website, store group and store view" stepKey="commentCreateWebsiteStoreAndView"/> |
| 30 | + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> |
| 31 | + <argument name="newWebsiteName" value="{{customWebsite.name}}"/> |
| 32 | + <argument name="websiteCode" value="{{customWebsite.code}}"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore"> |
| 35 | + <argument name="website" value="{{customWebsite.name}}"/> |
| 36 | + <argument name="storeGroupName" value="{{customStoreGroup.name}}"/> |
| 37 | + <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> |
| 40 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 41 | + <argument name="customStore" value="customStore"/> |
| 42 | + </actionGroup> |
| 43 | + <!--Enable Table Rate method and import csv file--> |
| 44 | + <comment userInput="Enable Table Rate method and import csv file" stepKey="commentEnableTableRates"/> |
| 45 | + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> |
| 46 | + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite"> |
| 47 | + <argument name="website" value="_defaultWebsite"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethodForDefaultWebsite"> |
| 50 | + <argument name="status" value="0"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigForDefaultWebsite"/> |
| 53 | + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchCustomWebsite"> |
| 54 | + <argument name="website" value="customWebsite"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethod"> |
| 57 | + <argument name="status" value="1"/> |
| 58 | + </actionGroup> |
| 59 | + <actionGroup ref="AdminImportFileTableRatesShippingMethodActionGroup" stepKey="importCSVFile"> |
| 60 | + <argument name="file" value="test_tablerates.csv"/> |
| 61 | + </actionGroup> |
| 62 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> |
| 63 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 64 | + </before> |
| 65 | + <after> |
| 66 | + <!--Delete created data--> |
| 67 | + <comment userInput="Delete created data" stepKey="commetnDeleteCreatedData"/> |
| 68 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 69 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 70 | + <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteSecondCreatedCustomer"> |
| 71 | + <argument name="customerEmail" value="$$createCustomer.id$$"/> |
| 72 | + </actionGroup> |
| 73 | + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite"> |
| 74 | + <argument name="websiteName" value="{{customWebsite.name}}"/> |
| 75 | + </actionGroup> |
| 76 | + <actionGroup ref="logout" stepKey="logout"/> |
| 77 | + </after> |
| 78 | + <!--Assign product to custom website--> |
| 79 | + <comment userInput="Assign product to custom website" stepKey="commentAssignProductToWebsite"/> |
| 80 | + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/> |
| 81 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 82 | + <actionGroup ref="unassignWebsiteFromProductActionGroup" stepKey="unassignWebsiteInProduct"> |
| 83 | + <argument name="website" value="{{_defaultWebsite.name}}"/> |
| 84 | + </actionGroup> |
| 85 | + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct"> |
| 86 | + <argument name="website" value="{{customWebsite.name}}"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 89 | + <!--Assign customer to custom website--> |
| 90 | + <comment userInput="Assign customer to custom website" stepKey="commentAssignCustomerToWebsite"/> |
| 91 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage"> |
| 92 | + <argument name="customerId" value="$$createCustomer.id$$"/> |
| 93 | + </actionGroup> |
| 94 | + <actionGroup ref="AdminAssociateCustomerToCustomWebsiteActionGroup" stepKey="associateCustomerToWebsite"> |
| 95 | + <argument name="websiteName" value="{{customWebsite.name}}"/> |
| 96 | + </actionGroup> |
| 97 | + <actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="saveAndCheckSuccessMessage"/> |
| 98 | + <!--Create order--> |
| 99 | + <comment userInput="Create order" stepKey="commentCreateOrder"/> |
| 100 | + <actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer"> |
| 101 | + <argument name="customer" value="$$createCustomer$$"/> |
| 102 | + <argument name="storeView" value="customStore"/> |
| 103 | + </actionGroup> |
| 104 | + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToTheOrder"> |
| 105 | + <argument name="product" value="$$createProduct$$"/> |
| 106 | + </actionGroup> |
| 107 | + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerInfo"> |
| 108 | + <argument name="customer" value="$$createCustomer$$"/> |
| 109 | + <argument name="address" value="US_Address_TX"/> |
| 110 | + </actionGroup> |
| 111 | + <!--Choose Best Way shipping Method--> |
| 112 | + <comment userInput="Choose Best Way shipping Method" stepKey="commentChooseShippingMethod"/> |
| 113 | + <actionGroup ref="AdminOrderSelectShippingMethodActionGroup" stepKey="chooseBestWayMethod"> |
| 114 | + <argument name="methodTitle" value="Best Way"/> |
| 115 | + <argument name="methodName" value="Table Rate"/> |
| 116 | + </actionGroup> |
| 117 | + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> |
| 118 | + </test> |
| 119 | +</tests> |
0 commit comments