|
| 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="StorefrontVerifyGuestCheckoutUsingFreeShippingAndTaxesTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Checkout"/> |
| 13 | + <stories value="Checkout via Guest Checkout"/> |
| 14 | + <title value="Verify guest checkout using free shipping and tax variations"/> |
| 15 | + <description value="Verify guest checkout using free shipping and tax variations"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-28285"/> |
| 18 | + <group value="mtf_migrated"/> |
| 19 | + <group value="checkout"/> |
| 20 | + <group value="tax"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/> |
| 24 | + <createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/> |
| 25 | + <createData entity="MinimumOrderAmount100" stepKey="minimumOrderAmount"/> |
| 26 | + <createData entity="taxRate_US_NY_8_1" stepKey="createTaxRateUSNY"/> |
| 27 | + <createData entity="DefaultTaxRuleWithCustomTaxRate" stepKey="createTaxRuleUSNY"> |
| 28 | + <requiredEntity createDataKey="createTaxRateUSNY" /> |
| 29 | + </createData> |
| 30 | + <createData entity="defaultSimpleProduct" stepKey="simpleProduct"> |
| 31 | + <field key="price">10.00</field> |
| 32 | + </createData> |
| 33 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 34 | + <createData entity="ApiConfigurableProduct" stepKey="configurableProduct"> |
| 35 | + <requiredEntity createDataKey="createCategory"/> |
| 36 | + </createData> |
| 37 | + <createData entity="productAttributeWithTwoOptions" stepKey="createProductAttribute"/> |
| 38 | + <createData entity="productAttributeOption1" stepKey="createProductAttributeOption"> |
| 39 | + <requiredEntity createDataKey="createProductAttribute"/> |
| 40 | + </createData> |
| 41 | + <createData entity="AddToDefaultSet" stepKey="addToDefaultSet"> |
| 42 | + <requiredEntity createDataKey="createProductAttribute"/> |
| 43 | + </createData> |
| 44 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getProductAttributeOption"> |
| 45 | + <requiredEntity createDataKey="createProductAttribute"/> |
| 46 | + </getData> |
| 47 | + <createData entity="ApiSimpleOne" stepKey="configurableChildProduct"> |
| 48 | + <requiredEntity createDataKey="createProductAttribute"/> |
| 49 | + <requiredEntity createDataKey="getProductAttributeOption"/> |
| 50 | + <field key="price">10.00</field> |
| 51 | + </createData> |
| 52 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> |
| 53 | + <requiredEntity createDataKey="configurableProduct"/> |
| 54 | + <requiredEntity createDataKey="createProductAttribute"/> |
| 55 | + <requiredEntity createDataKey="getProductAttributeOption"/> |
| 56 | + </createData> |
| 57 | + <createData entity="ConfigurableProductAddChild" stepKey="configurableProductAddChild"> |
| 58 | + <requiredEntity createDataKey="configurableProduct"/> |
| 59 | + <requiredEntity createDataKey="configurableChildProduct"/> |
| 60 | + </createData> |
| 61 | + <createData entity="SimpleProduct2" stepKey="firstBundleChildProduct"> |
| 62 | + <field key="price">100.00</field> |
| 63 | + </createData> |
| 64 | + <createData entity="SimpleProduct2" stepKey="secondBundleChildProduct"> |
| 65 | + <field key="price">200.00</field> |
| 66 | + </createData> |
| 67 | + <createData entity="BundleProductPriceViewRange" stepKey="bundleProduct"> |
| 68 | + <requiredEntity createDataKey="createCategory"/> |
| 69 | + </createData> |
| 70 | + <createData entity="MultipleSelectOption" stepKey="bundleOption"> |
| 71 | + <requiredEntity createDataKey="bundleProduct"/> |
| 72 | + <field key="required">True</field> |
| 73 | + </createData> |
| 74 | + <createData entity="ApiBundleLink" stepKey="firstLinkOptionToProduct"> |
| 75 | + <requiredEntity createDataKey="bundleProduct"/> |
| 76 | + <requiredEntity createDataKey="bundleOption"/> |
| 77 | + <requiredEntity createDataKey="firstBundleChildProduct"/> |
| 78 | + </createData> |
| 79 | + <createData entity="ApiBundleLink" stepKey="secondLinkOptionToProduct"> |
| 80 | + <requiredEntity createDataKey="bundleProduct"/> |
| 81 | + <requiredEntity createDataKey="bundleOption"/> |
| 82 | + <requiredEntity createDataKey="secondBundleChildProduct"/> |
| 83 | + </createData> |
| 84 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> |
| 85 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 86 | + <argument name="indices" value=""/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 89 | + <argument name="tags" value=""/> |
| 90 | + </actionGroup> |
| 91 | + </before> |
| 92 | + <after> |
| 93 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 94 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 95 | + <deleteData createDataKey="configurableChildProduct" stepKey="deleteConfigurableChildProduct"/> |
| 96 | + <deleteData createDataKey="configurableProduct" stepKey="deleteConfigurableProduct"/> |
| 97 | + <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> |
| 98 | + <deleteData createDataKey="firstBundleChildProduct" stepKey="deleteFirstBundleChild"/> |
| 99 | + <deleteData createDataKey="secondBundleChildProduct" stepKey="deleteSecondBundleChild"/> |
| 100 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
| 101 | + <deleteData createDataKey="createTaxRuleUSNY" stepKey="deleteTaxRuleUSNY"/> |
| 102 | + <deleteData createDataKey="createTaxRateUSNY" stepKey="deleteTaxRateUSNY"/> |
| 103 | + <createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/> |
| 104 | + <createData entity="DefaultMinimumOrderAmount" stepKey="defaultMinimumOrderAmount"/> |
| 105 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> |
| 106 | + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> |
| 107 | + </after> |
| 108 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyProduct"> |
| 109 | + <argument name="product" value="$simpleProduct$"/> |
| 110 | + </actionGroup> |
| 111 | + <actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addSimpleProductToTheCart"> |
| 112 | + <argument name="productQty" value="1"/> |
| 113 | + </actionGroup> |
| 114 | + <actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart"> |
| 115 | + <argument name="urlKey" value="$configurableProduct.custom_attributes[url_key]$" /> |
| 116 | + <argument name="productAttribute" value="$createProductAttribute.default_value$"/> |
| 117 | + <argument name="productOption" value="$getProductAttributeOption.label$"/> |
| 118 | + <argument name="qty" value="1"/> |
| 119 | + </actionGroup> |
| 120 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyBundleProduct"> |
| 121 | + <argument name="product" value="$bundleProduct$"/> |
| 122 | + </actionGroup> |
| 123 | + <actionGroup ref="StorefrontAddBundleProductFromProductToCartWithMultiOptionActionGroup" stepKey="addBundleProductToCart"> |
| 124 | + <argument name="productName" value="$bundleProduct.name$"/> |
| 125 | + <argument name="optionName" value="$bundleOption.name$"/> |
| 126 | + <argument name="value" value="$firstBundleChildProduct.name$ +$100.00"/> |
| 127 | + </actionGroup> |
| 128 | + <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="clickMiniCart"/> |
| 129 | + <actionGroup ref="CheckoutFillEstimateShippingAndTaxActionGroup" stepKey="fillEstimateShippingAndTaxFields"> |
| 130 | + <argument name="address" value="US_Address_NY_Default_Shipping"/> |
| 131 | + </actionGroup> |
| 132 | + <click selector="{{CheckoutCartSummarySection.shippingMethodElementId('freeshipping', 'freeshipping')}}" stepKey="selectShippingMethod"/> |
| 133 | + <see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$9.72" stepKey="seeTaxAmount"/> |
| 134 | + <reloadPage stepKey="reloadThePage"/> |
| 135 | + <waitForPageLoad stepKey="waitForPageToReload"/> |
| 136 | + <see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$9.72" stepKey="seeTaxAmountAfterLoadPage"/> |
| 137 | + <scrollTo selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="scrollToProceedToCheckout" /> |
| 138 | + <click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout"/> |
| 139 | + <waitForPageLoad stepKey="waitForPageToLoad"/> |
| 140 | + <actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillTheSignInForm"> |
| 141 | + <argument name="customer" value="Simple_US_Customer"/> |
| 142 | + <argument name="customerAddress" value="US_Address_NY_Default_Shipping"/> |
| 143 | + </actionGroup> |
| 144 | + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/> |
| 145 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 146 | + <seeElement selector="{{StorefrontMinicartSection.emptyMiniCart}}" stepKey="assertEmptyCart" /> |
| 147 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumberWithoutLink}}" stepKey="orderId"/> |
| 148 | + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/> |
| 149 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrderById"> |
| 150 | + <argument name="orderId" value="$orderId"/> |
| 151 | + </actionGroup> |
| 152 | + <actionGroup ref="AdminAssertOrderAvailableButtonsActionGroup" stepKey="assertOrderButtons"/> |
| 153 | + <see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$129.72" stepKey="seeGrandTotal"/> |
| 154 | + <actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeOrderPendingStatus"/> |
| 155 | + <actionGroup ref="AdminShipThePendingOrderActionGroup" stepKey="shipTheOrder"/> |
| 156 | + <actionGroup ref="AssertOrderAddressInformationActionGroup" stepKey="assertCustomerInformation"> |
| 157 | + <argument name="customer" value=""/> |
| 158 | + <argument name="shippingAddress" value="US_Address_NY_Default_Shipping"/> |
| 159 | + <argument name="billingAddress" value="US_Address_NY_Default_Shipping"/> |
| 160 | + <argument name="customerGroup" value=""/> |
| 161 | + </actionGroup> |
| 162 | + </test> |
| 163 | +</tests> |
0 commit comments