|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2024 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowLinkTest"> |
| 12 | + <annotations> |
| 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"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4378"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!--Create simple product--> |
| 22 | + <createData entity="simpleProductWithoutCategory" stepKey="createProduct"> |
| 23 | + <field key="price">100.00</field> |
| 24 | + </createData> |
| 25 | + <!--Create a customer--> |
| 26 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 27 | + <!--Login to admin site--> |
| 28 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 29 | + <!--Create cart price rule and coupon--> |
| 30 | + <actionGroup ref="AdminCreateCartPriceRuleWithCouponCodeActionGroup" stepKey="createCartPriceRule"> |
| 31 | + <argument name="ruleName" value="CatPriceRule"/> |
| 32 | + <argument name="couponCode" value="CatPriceRule.coupon_code"/> |
| 33 | + </actionGroup> |
| 34 | + </before> |
| 35 | + <after> |
| 36 | + <!--Delete created product--> |
| 37 | + <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> |
| 38 | + <!--Delete created cart price rule--> |
| 39 | + <actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllCartPriceRules"/> |
| 40 | + <!--Delete created customer--> |
| 41 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 42 | + <!--Logout from admin site--> |
| 43 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 44 | + </after> |
| 45 | + <actionGroup ref="StorefrontAddSimpleProductWithQtyActionGroup" stepKey="addSimpleProductToCart"> |
| 46 | + <argument name="product" value="$$createProduct$$"/> |
| 47 | + <argument name="quantity" value="1"/> |
| 48 | + </actionGroup> |
| 49 | + <!--Go to shopping cart--> |
| 50 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openShoppingCartPage"/> |
| 51 | + <waitForElementVisible selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="waitForPayPalBtn"/> |
| 52 | + <click selector="{{CheckoutPaymentSection.checkoutWithPaypal}}" stepKey="clickPayPalBtn"/> |
| 53 | + <waitForElementClickable selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="waitForReviewOrderButtonToBeClickable"/> |
| 54 | + <click selector="{{CheckoutPaymentSection.reviewOrder}}" stepKey="clickReviewOrderButton"/> |
| 55 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 56 | + </test> |
| 57 | +</tests> |
0 commit comments