|
5 | 5 | * All Rights Reserved. |
6 | 6 | */ |
7 | 7 | --> |
8 | | -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
9 | | - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 8 | +<tests |
| 9 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 | 11 | <test name="AdminVerifySubTotalRoundingForDecimalQuantityEnabledTest"> |
11 | 12 | <annotations> |
12 | 13 | <features value="Catalog"/> |
|
18 | 19 | <group value="catalog"/> |
19 | 20 | </annotations> |
20 | 21 | <before> |
21 | | - <!-- Step 2: Create product with price 20.67 --> |
22 | | - <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
23 | | - <field key="price">20.67</field> |
24 | | - </createData> |
| 22 | + <!--Pre-condition 1: Create customer --> |
| 23 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 24 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 25 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 26 | + </actionGroup> |
25 | 27 | <!-- Admin login --> |
26 | 28 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
27 | 29 | <!--Step1: Set notify for quantity below = 0.5 in config --> |
|
30 | 32 | <argument name="quantityValue" value="0.5"/> |
31 | 33 | </actionGroup> |
32 | 34 | <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> |
| 35 | + <!-- Step 2: Create product with price 20.67 --> |
| 36 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 37 | + <field key="price">20.67</field> |
| 38 | + </createData> |
33 | 39 | </before> |
34 | 40 | <after> |
35 | | - <!-- Delete product --> |
| 41 | + <!-- Logout from storefront --> |
| 42 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/> |
| 43 | + <!-- Delete customer,product --> |
| 44 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
36 | 45 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
37 | 46 | <!-- Reset notify for quantity below --> |
38 | 47 | <actionGroup ref="AdminNavigateToProductStockOptionsFeatureActionGroup" stepKey="navigateToProductStockOption"/> |
39 | | - <actionGroup ref="AdminInProductStockOptionsFeatureResetNotifyForQuantityBelowActionGroup" stepKey="navigateToProductStockOptions"/> |
| 48 | + <actionGroup ref="AdminInProductStockOptionsFeatureResetNotifyForQuantityBelowActionGroup" stepKey="resetNotifyForQuantityBelow"/> |
40 | 49 | <!-- Admin logout --> |
41 | 50 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> |
42 | 51 | </after> |
|
48 | 57 | <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="1.5" stepKey="seeProductQuantity"/> |
49 | 58 | <!--Step 2: Open advanced inventory Section --> |
50 | 59 | <actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/> |
51 | | - <!-- Step 2: Set decimal qantity to yes --> |
| 60 | + <!-- Step 2: Set decimal quantity to yes --> |
52 | 61 | <actionGroup ref="AdminSetQtyUsesDecimalsConfigActionGroup" stepKey="setQtyUsesDecimalsConfig"> |
53 | 62 | <argument name="value" value="Yes"/> |
54 | 63 | </actionGroup> |
|
73 | 82 | <waitForPageLoad stepKey="waitForPriceLoad"/> |
74 | 83 | <waitForText selector="{{StorefrontProductPageSection.subTotal}}" userInput="$10.34" stepKey="seeSubTotal"/> |
75 | 84 | <waitForText selector="{{StorefrontProductPageSection.orderTotal}}" userInput="$12.84" stepKey="seeOrderTotal"/> |
76 | | - <!-- Step 4: Proceed to checkout and place order --> |
| 85 | + <!-- Step 4: Proceed to checkout, place order and verify order placed successfully --> |
77 | 86 | <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/> |
78 | | - <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"/> |
79 | | - <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="checkoutPlaceOrder"/> |
80 | | - <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
81 | | - <!-- Step 5,6: In admin check order details total in created order and no verify subtotal rounding issues for decimal enabled product --> |
| 87 | + <actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/> |
| 88 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToPaymentPage"/> |
| 89 | + <waitForPageLoad stepKey="waitForPaymentPageToLoad"/> |
| 90 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> |
| 91 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"> |
| 92 | + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> |
| 93 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> |
| 94 | + </actionGroup> |
| 95 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 96 | + <!-- Step 5: In admin check order details total in created order and verify no subtotal rounding issues for decimal enabled product --> |
82 | 97 | <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="addFilterToGridAndOpenOrder"> |
83 | 98 | <argument name="entityId" value="{$grabOrderNumber}"/> |
84 | 99 | </actionGroup> |
85 | | - <actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal1"> |
| 100 | + <actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal"> |
86 | 101 | <argument name="subtotal" value="$10.34"/> |
87 | 102 | <argument name="shippingAndHandling" value="$2.50"/> |
88 | | - <argument name="grandTotal" value="12.84"/> |
| 103 | + <argument name="grandTotal" value="$12.84"/> |
89 | 104 | </actionGroup> |
90 | 105 | </test> |
91 | 106 | </tests> |
0 commit comments