/
EndToEndB2CGuestUserTest.xml
89 lines (80 loc) · 4.73 KB
/
EndToEndB2CGuestUserTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="EndToEndB2CGuestUserTest">
<before>
<createData entity="ApiSalesRule" stepKey="createSalesRule"/>
<createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon">
<requiredEntity createDataKey="createSalesRule"/>
</createData>
</before>
<after>
<deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/>
</after>
<!-- Step 5: User uses coupon codes -->
<comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" />
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/>
<actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart">
<argument name="coupon" value="$$createSalesRuleCoupon$$"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon">
<argument name="rule" value="$$createSalesRule$$"/>
<argument name="discount" value="48.00"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount">
<argument name="subtotal" value="480.00"/>
<argument name="shipping" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="447.00"/>
</actionGroup>
<actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/>
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon">
<argument name="subtotal" value="480.00"/>
<argument name="shipping" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="495.00"/>
</actionGroup>
<comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon" />
</test>
<test name="EndToEndB2CGuestUserMysqlTest">
<before>
<createData entity="ApiSalesRule" stepKey="createSalesRule"/>
<createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon">
<requiredEntity createDataKey="createSalesRule"/>
</createData>
</before>
<after>
<deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/>
</after>
<!-- Step 5: User uses coupon codes -->
<comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" />
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/>
<actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart">
<argument name="coupon" value="$$createSalesRuleCoupon$$"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon">
<argument name="rule" value="$$createSalesRule$$"/>
<argument name="discount" value="48.00"/>
</actionGroup>
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount">
<argument name="subtotal" value="480.00"/>
<argument name="shipping" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="447.00"/>
</actionGroup>
<actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/>
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon">
<argument name="subtotal" value="480.00"/>
<argument name="shipping" value="15.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="495.00"/>
</actionGroup>
<comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon" />
</test>
</tests>