|
29 | 29 | <createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule">
|
30 | 30 | <requiredEntity createDataKey="createCartPriceRule"/>
|
31 | 31 | </createData>
|
| 32 | + |
| 33 | + <!-- Login as admin --> |
| 34 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
32 | 35 | </before>
|
33 | 36 | <after>
|
34 | 37 | <!-- Delete simple product -->
|
35 | 38 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
36 |
| - |
37 | 39 | <!-- Delete sales rule -->
|
38 | 40 | <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/>
|
39 |
| - |
| 41 | + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> |
40 | 42 | <!-- Admin log out -->
|
41 | 43 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
42 | 44 | </after>
|
43 | 45 |
|
44 | 46 | <!-- Go to Storefront as Guest and add simple product to cart -->
|
45 | 47 | <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
|
46 |
| - <argument name="product" value="$$createProduct$$"/> |
| 48 | + <argument name="product" value="$createProduct$"/> |
47 | 49 | </actionGroup>
|
48 | 50 |
|
49 | 51 | <!-- Go to Checkout -->
|
|
56 | 58 |
|
57 | 59 | <!-- Click Apply Discount Code: section is expanded. Input promo code, apply and see success message -->
|
58 | 60 | <actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCoupon">
|
59 |
| - <argument name="discountCode" value="$$createCouponForCartPriceRule.code$$"/> |
| 61 | + <argument name="discountCode" value="$createCouponForCartPriceRule.code$"/> |
60 | 62 | </actionGroup>
|
61 | 63 |
|
62 | 64 | <!-- Apply button is disappeared -->
|
63 | 65 | <dontSeeElement selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="dontSeeApplyButton"/>
|
64 | 66 |
|
65 | 67 | <!-- Cancel coupon button is appeared -->
|
| 68 | + <waitForElementVisible selector="{{DiscountSection.CancelCouponBtn}}" stepKey="waitCancelButtonAppears"/> |
66 | 69 | <seeElement selector="{{DiscountSection.CancelCouponBtn}}" stepKey="seeCancelCouponButton"/>
|
67 | 70 |
|
68 | 71 | <!-- Order summary contains information about applied code -->
|
| 72 | + <waitForElementVisible selector="{{CheckoutPaymentSection.discount}}" stepKey="waitForDiscountCouponInSummaryBlock"/> |
69 | 73 | <seeElement selector="{{CheckoutPaymentSection.discount}}" stepKey="seeDiscountCouponInSummaryBlock"/>
|
70 | 74 | <see selector="{{CheckoutPaymentSection.discountPrice}}" userInput="-$5.00" stepKey="seeDiscountPrice"/>
|
71 | 75 |
|
|
76 | 80 | <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
|
77 | 81 | <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
|
78 | 82 |
|
79 |
| - <!-- Login as admin --> |
80 |
| - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
81 |
| - |
82 | 83 | <!-- Verify total on order page -->
|
83 | 84 | <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById">
|
84 |
| - <argument name="orderId" value="$grabOrderNumber"/> |
| 85 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
85 | 86 | </actionGroup>
|
86 | 87 |
|
87 | 88 | <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
|
88 | 89 | <scrollTo selector="{{AdminOrderTotalSection.grandTotal}}" stepKey="scrollToOrderTotalSection"/>
|
89 |
| - <see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$$createProduct.price$$" stepKey="checkTotal"/> |
| 90 | + <see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$createProduct.price$" stepKey="checkTotal"/> |
90 | 91 | </test>
|
91 | 92 | </tests>
|
0 commit comments