|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="MultipleAddressCheckoutWithTwoDifferentRatesTest"> |
| 11 | + <annotations> |
| 12 | + <stories value="Multiple Address Checkout with Table Rates (Use Two Different Rates)"/> |
| 13 | + <title value="Verify Multiple Address Checkout with Table Rates (Use Two Different Rates)"/> |
| 14 | + <description value="Verify Multiple Address Checkout with Table Rates (Use Two Different Rates)"/> |
| 15 | + <severity value="MAJOR"/> |
| 16 | + <testCaseId value="AC-4499" /> |
| 17 | + </annotations> |
| 18 | + <before> |
| 19 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 20 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 21 | + <requiredEntity createDataKey="createCategory"/> |
| 22 | + </createData> |
| 23 | + <createData entity="Simple_US_Customer_CA_NY_Addresses" stepKey="createCustomer"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 25 | + <!-- remove the Filter From the page--> |
| 26 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/> |
| 27 | + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <!-- Delete created data --> |
| 31 | + <!-- disable table rate meth0d --> |
| 32 | + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> |
| 33 | + <!-- Switch to Website scope --> |
| 34 | + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView"> |
| 35 | + <argument name="website" value="_defaultWebsite"/> |
| 36 | + </actionGroup> |
| 37 | + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="disableTableRatesShippingMethod"> |
| 38 | + <argument name="status" value="0"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> |
| 41 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 42 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 43 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 44 | + <magentoCron groups="index" stepKey="reindex"/> |
| 45 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 46 | + <argument name="tags" value=""/> |
| 47 | + </actionGroup> |
| 48 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 49 | + </after> |
| 50 | + <!-- Go to Stores > Configuration > Sales > Shipping Methods --> |
| 51 | + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> |
| 52 | + <!-- Switch to Website scope --> |
| 53 | + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView"> |
| 54 | + <argument name="website" value="_defaultWebsite"/> |
| 55 | + </actionGroup> |
| 56 | + <!-- Enable Table Rate method and save config --> |
| 57 | + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethod"/> |
| 58 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> |
| 59 | + <!-- Make sure you have Condition Weight vs. Destination --> |
| 60 | + <see selector="{{AdminShippingMethodTableRatesSection.condition}}" userInput="{{TableRatesWeightVSDestination.condition}}" stepKey="seeDefaultCondition"/> |
| 61 | + <!-- Import file and save config --> |
| 62 | + <conditionalClick selector="{{AdminShippingMethodTableRatesSection.carriersTableRateTab}}" dependentSelector="{{AdminShippingMethodTableRatesSection.carriersTableRateActive}}" visible="false" stepKey="expandTab"/> |
| 63 | + <attachFile selector="{{AdminShippingMethodTableRatesSection.importFile}}" userInput="table_rate_30895.csv" stepKey="attachFileForImport"/> |
| 64 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/> |
| 65 | + <!-- Login as customer --> |
| 66 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 67 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 68 | + </actionGroup> |
| 69 | + <!-- Add product to the shopping cart --> |
| 70 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage"> |
| 71 | + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 72 | + </actionGroup> |
| 73 | + <actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCartAgain"> |
| 74 | + <argument name="quantity" value="2"/> |
| 75 | + </actionGroup> |
| 76 | + <!-- Open the shopping cart page --> |
| 77 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCart"/> |
| 78 | + <click selector="{{MultishippingSection.checkoutWithMultipleAddresses}}" stepKey="proceedMultishipping"/> |
| 79 | + <!-- Select different addresses and click 'Go to Shipping Information' --> |
| 80 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectCAAddress"> |
| 81 | + <argument name="sequenceNumber" value="1"/> |
| 82 | + <argument name="option" value="John Doe, 7700 West Parmer Lane 113, Los Angeles, California 90001, United States"/> |
| 83 | + </actionGroup> |
| 84 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectNYAddress"> |
| 85 | + <argument name="sequenceNumber" value="2"/> |
| 86 | + <argument name="option" value="John Doe, 368 Broadway St. Apt. 113, New York, New York 10001, United States"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="StorefrontSaveAddressActionGroup" stepKey="saveAddresses"/> |
| 89 | + <see selector="{{ShippingMethodSection.shippingMethod('1','2')}}" userInput="Table Rate $5.00" stepKey="assertTableRateForLA"/> |
| 90 | + <see selector="{{ShippingMethodSection.shippingMethod('2','2')}}" userInput="Table Rate $10.00" stepKey="assertTableRateForNY"/> |
| 91 | + </test> |
| 92 | +</tests> |
0 commit comments