|
| 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="AdminPlaceOrderWithUSPSOnlineShippingCarrierTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Place order using USPS Shipping carrier"/> |
| 14 | + <title value="Use USPS online shipping carrier during order placement in admin for registered customer Test"/> |
| 15 | + <description value="Select USPS online shipping method while order placement from backend for a registered customer"/> |
| 16 | + <testCaseId value="AC-5374"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <features value="Shipping"/> |
| 19 | + <group value="3rd_party_integration"/> |
| 20 | + <group value="EnableUSPSShippingSuite"/> |
| 21 | + <!-- <group value="pr_exclude"/>--> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <!--Login as Admin--> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminToConfig"/> |
| 26 | + <!-- Create product --> |
| 27 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 28 | + <field key="price">100.00</field> |
| 29 | + </createData> |
| 30 | + <!--Create UK customer--> |
| 31 | + <createData entity="UKCustomer" stepKey="createUKCustomer"/> |
| 32 | + <!-- Enabling Check/Money Order Payment Method --> |
| 33 | + <magentoCLI command="config:set {{EnableCheckMoneyOrderPaymentMethod.path}} {{EnableCheckMoneyOrderPaymentMethod.value}}" stepKey="enableCheckMoneyOrderPaymentMethod"/> |
| 34 | + <!--Set US Shipping settings origin data--> |
| 35 | + <actionGroup ref="AdminSetShippingOriginConfigActionGroup" stepKey="setShippingOriginConfigurationData"> |
| 36 | + <argument name="country" value="United States"/> |
| 37 | + <argument name="state" value="Texas"/> |
| 38 | + <argument name="postcode" value="78729"/> |
| 39 | + </actionGroup> |
| 40 | + <!--Cache flush--> |
| 41 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCachePostConfiguring"> |
| 42 | + <argument name="tags" value="config full_page"/> |
| 43 | + </actionGroup> |
| 44 | + </before> |
| 45 | + <after> |
| 46 | + <!--Reset Shipping Origin configurations to default | default address - US California--> |
| 47 | + <actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="resetShippingOriginConfig"/> |
| 48 | + <!--delete UK customer--> |
| 49 | + <deleteData createDataKey="createUKCustomer" stepKey="deleteCustomer"/> |
| 50 | + <!--delete product--> |
| 51 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 52 | + <!--Logout Admin--> |
| 53 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminToRollBackConfig"/> |
| 54 | + </after> |
| 55 | + <!--Navigate to create new order with existing customer--> |
| 56 | + <actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> |
| 57 | + <argument name="customer" value="$$createUKCustomer$$"/> |
| 58 | + </actionGroup> |
| 59 | + <!--Admin add simple product to order--> |
| 60 | + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToOrder"> |
| 61 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 62 | + </actionGroup> |
| 63 | + <!--Admin add new UK billing address while creating order--> |
| 64 | + <selectOption userInput="Add New Address" selector="{{AdminOrderFormBillingAddressSection.selectAddress}}" stepKey="addNewBillingAddress" /> |
| 65 | + <actionGroup ref="AdminFillAddressInformationInOrderActionGroup" stepKey="FillOrderNewShippingAddress"> |
| 66 | + <argument name="customer" value="$$createUKCustomer$$"/> |
| 67 | + <argument name="address" value="UK_Not_Default_Address"/> |
| 68 | + </actionGroup> |
| 69 | + <!--Scroll to element & click to reflect details as per defined address & customer--> |
| 70 | + <scrollTo selector="{{AdminOrderFormBillingAddressSection.Phone}}" stepKey="scrollToElementInteractable"/> |
| 71 | + <click selector="{{AdminOrderFormPaymentSection.linkPaymentOptions}}" stepKey="clickToReflectDetailsAccordingToInputData"/> |
| 72 | + <!--click on get available payment methods link--> |
| 73 | + <click selector="{{AdminOrderFormPaymentSection.linkPaymentOptions}}" stepKey="clickGetAvailablePaymentMethods"/> |
| 74 | + <!--select Check/Money order payment method--> |
| 75 | + <conditionalClick selector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" dependentSelector="{{AdminOrderFormPaymentSection.checkMoneyOrderText}}" visible="false" stepKey="selectCheckMoneyOrder"/> |
| 76 | + <!--click on get shipping methods link--> |
| 77 | + <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="clickGetAvailableShippingMethods"/> |
| 78 | + <!--select Priority Mail Express International Flat Rate USPS shipping method--> |
| 79 | + <click selector="{{AdminInvoicePaymentShippingSection.selectUSPSType}}" stepKey="selectUSPSMethod"/> |
| 80 | + <waitForAjaxLoad stepKey="waitForAjaxLoadPostSelectingUSPSShippingMethod"/> |
| 81 | + <!--click submit order--> |
| 82 | + <actionGroup ref="AdminOrderClickSubmitOrderActionGroup" stepKey="clickSubmitOrder" /> |
| 83 | + <!--Assert order created--> |
| 84 | + <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="checkOrderSuccessfullyCreated"/> |
| 85 | + </test> |
| 86 | +</tests> |
0 commit comments