|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 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="StorefrontVerifyUSPSShippingMethodIsAvailableTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Shipping"/> |
| 14 | + <stories value="Place order for international address other than US using USPS"/> |
| 15 | + <title value="Storefront place order with usps shipping method"/> |
| 16 | + <description value="Verify storefront able to see First-Class Package International Service usps shipping method"/> |
| 17 | + <testCaseId value="AC-14499"/> |
| 18 | + <severity value="MAJOR"/> |
| 19 | + <group value="3rd_party_integration"/> |
| 20 | + <group value="EnableUSPSShippingForRestAPISuite"/> |
| 21 | + <group value="pr_exclude"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <!-- Create Product and customer data --> |
| 25 | + <createData entity="SimpleProduct" stepKey="createProduct"/> |
| 26 | + <createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> |
| 30 | + <!--Delete product and customer data--> |
| 31 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 32 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 33 | + </after> |
| 34 | + <!-- Step 1:Navigate to storefront --> |
| 35 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomerToStorefront"> |
| 36 | + <argument name="Customer" value="$createCustomer$" /> |
| 37 | + </actionGroup> |
| 38 | + <!-- Step 2:Add product to cart --> |
| 39 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage"> |
| 40 | + <argument name="productUrlKey" value="$createProduct.custom_attributes[url_key]$"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> |
| 43 | + <argument name="product" value="$createProduct$" /> |
| 44 | + <argument name="productCount" value="1" /> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 47 | + <!-- Step 3:Select International Address other than USA --> |
| 48 | + <actionGroup ref="CustomerCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress"> |
| 49 | + <argument name="address" value="Canada_Address"/> |
| 50 | + </actionGroup> |
| 51 | + <!-- Step 4:Select First-Class Package International Service USPS Shipping method --> |
| 52 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setUSPSShippingMethodOnCheckout"> |
| 53 | + <argument name="shippingMethodName" value="{{USPSFirstClassInternationalShippingMethodData.value}}"/> |
| 54 | + </actionGroup> |
| 55 | + <!-- Step 5:Place order --> |
| 56 | + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goToPaymentStep"/> |
| 57 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/> |
| 58 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> |
| 59 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="waitForOrderNumber"/> |
| 60 | + </test> |
| 61 | +</tests> |
0 commit comments