|
5 | 5 | * See COPYING.txt for license details.
|
6 | 6 | */
|
7 | 7 | -->
|
| 8 | + |
8 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
10 |
| - <test name="StorefrontVerifyGiftCardPromoWidgetForPayFlowLinkTest"> |
| 11 | + <test name="StorefrontApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowLinkTest"> |
11 | 12 | <annotations>
|
12 |
| - <features value="payFlow link"/> |
13 |
| - <stories value="Storefront Gift Card and Promo Codes"/> |
14 |
| - <title value="Verify that Apply gift cards or promo codes widget is shown on order review page"/> |
15 |
| - <description value="Verify that Apply gift cards or promo codes widget is shown on order review page for PayFlow Link (Includes Express Checkout)"/> |
| 13 | + <features value="Payments"/> |
| 14 | + <stories value="Payflow Link"/> |
| 15 | + <title value="Apply gift cards and promo codes widget are shown on Order review page for Payflow Link"/> |
| 16 | + <description value="As a guest, apply coupon and gift card while placing an order through paypal payflow Link"/> |
16 | 17 | <severity value="MAJOR"/>
|
17 | 18 | <testCaseId value="AC-4378"/>
|
18 | 19 | </annotations>
|
19 | 20 | <before>
|
| 21 | + <!--Create simple product--> |
20 | 22 | <createData entity="simpleProductWithoutCategory" stepKey="createProduct">
|
21 | 23 | <field key="price">100.00</field>
|
22 | 24 | </createData>
|
23 |
| - <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
24 |
| - <actionGroup ref="AdminEnablePayPalPayFlowLinkActionGroup" stepKey="ConfigPayPalPayFlowLink"> |
25 |
| - <argument name="credentials" value="SamplePaypalPaymentsFlowLinkConfig"/> |
26 |
| - </actionGroup> |
27 |
| - <!-- Create cart price rule --> |
28 |
| - <actionGroup ref="AdminCreateCartPriceRuleWithCouponCodeActionGroup" stepKey="createCartPriceRule"> |
29 |
| - <argument name="ruleName" value="CatPriceRule"/> |
30 |
| - <argument name="couponCode" value="CatPriceRule.coupon_code"/> |
31 |
| - </actionGroup> |
32 |
| - <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
33 |
| - <argument name="indices" value=""/> |
34 |
| - </actionGroup> |
35 |
| - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
36 |
| - <argument name="tags" value="config full_page"/> |
37 |
| - </actionGroup> |
| 25 | + <!--Create cart price rule and coupon--> |
| 26 | + <createData entity="ActiveSalesRuleForNotLoggedIn" stepKey="createCartPriceRule"/> |
| 27 | + <createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule"> |
| 28 | + <requiredEntity createDataKey="createCartPriceRule"/> |
| 29 | + </createData> |
| 30 | + <!--Create a customer--> |
| 31 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 32 | + <!--Login to admin site--> |
| 33 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
38 | 34 | </before>
|
39 | 35 | <after>
|
40 |
| - <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
41 |
| - <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule"> |
42 |
| - <argument name="ruleName" value="{{CatPriceRule.name}}"/> |
43 |
| - </actionGroup> |
44 |
| - <actionGroup ref="AdminDisablePayPalPayFlowLinkActionGroup" stepKey="disablePayPalPayFlow"/> |
| 36 | + <!--Delete created product--> |
| 37 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> |
| 38 | + <!--Delete created cart price rule--> |
| 39 | + <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> |
| 40 | + <!--Delete created customer--> |
| 41 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 42 | + <!--Logout from admin site--> |
45 | 43 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
46 | 44 | </after>
|
47 |
| - <actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart" before="waitForGiftCardHeaderToBeClickable"> |
| 45 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 46 | + <argument name="indices" value=""/> |
| 47 | + </actionGroup> |
| 48 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
| 49 | + <argument name="tags" value="config full_page"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart"> |
48 | 52 | <argument name="product" value="$$createProduct$$"/>
|
49 | 53 | <argument name="quantity" value="1"/>
|
50 | 54 | </actionGroup>
|
51 | 55 | <!--Go to shopping cart-->
|
52 | 56 | <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/>
|
53 | 57 | <waitForElementVisible selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="waitForPayPalBtn"/>
|
54 | 58 | <click selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="clickPayPalBtn"/>
|
55 |
| - <!--Login to Paypal in-context--> |
56 |
| - <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal"/> |
57 | 59 | <waitForElementClickable selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="waitForReviewOrderButtonToBeClickable"/>
|
58 | 60 | <click selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="clickReviewOrderButton"/>
|
59 | 61 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
|
66 | 68 | <click selector="{{StorefrontPayPalOrderReviewSection.applyDiscount}}" stepKey="clickApplyDiscount"/>
|
67 | 69 | <waitForPageLoad stepKey="waitForCouponToBeApplied"/>
|
68 | 70 | <waitForElement selector="{{StorefrontPayPalOrderReviewSection.grandTotal('$95.00')}}" stepKey="assertTotalAfterDiscountApplied"/>
|
| 71 | + <!--Place an order--> |
| 72 | + <actionGroup ref="ClickPlaceOrderActionGroup" after="assertTotalAfterGiftCardApplied" stepKey="clickOnPlaceOrder"/> |
69 | 73 | </test>
|
70 | 74 | </tests>
|
0 commit comments