|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + |
| 11 | + <test name="StorefrontCheckoutWithPurchaseOrderNumberPressKeyEnterTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Checkout with Purchase Order Payment. Create Order with Press Key Enter."/> |
| 15 | + <title value="Create Checkout with purchase order payment method test. Press key Enter on field Purchase Order Number for create Order."/> |
| 16 | + <description value="Create Checkout with purchase order payment method. Press key Enter on field Purchase Order Number for create Order."/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <group value="checkout"/> |
| 19 | + </annotations> |
| 20 | + |
| 21 | + <before> |
| 22 | + <createData entity="SimpleTwo" stepKey="createSimpleProduct"/> |
| 23 | + |
| 24 | + <!-- Enable payment method --> |
| 25 | + <magentoCLI command="config:set {{PurchaseOrderEnableConfigData.path}} {{PurchaseOrderEnableConfigData.value}}" stepKey="enablePaymentMethod"/> |
| 26 | + </before> |
| 27 | + |
| 28 | + <after> |
| 29 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
| 30 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 31 | + |
| 32 | + <!-- Disable payment method --> |
| 33 | + <magentoCLI command="config:set {{PurchaseOrderDisabledConfigData.path}} {{PurchaseOrderDisabledConfigData.value}}" stepKey="disablePaymentMethod"/> |
| 34 | + </after> |
| 35 | + |
| 36 | + <!--Go to product page--> |
| 37 | + <amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="navigateToSimpleProductPage"/> |
| 38 | + <waitForPageLoad stepKey="waitForCatalogPageLoad"/> |
| 39 | + |
| 40 | + <!--Add Product to Shopping Cart--> |
| 41 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 42 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 43 | + </actionGroup> |
| 44 | + |
| 45 | + <!--Go to Checkout--> |
| 46 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 47 | + |
| 48 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection"> |
| 49 | + <argument name="customerVar" value="CustomerEntityOne"/> |
| 50 | + <argument name="customerAddressVar" value="CustomerAddressSimple"/> |
| 51 | + </actionGroup> |
| 52 | + |
| 53 | + <!-- Checkout select Purchase Order payment --> |
| 54 | + <actionGroup ref="CheckoutSelectPurchaseOrderPaymentActionGroup" stepKey="selectPurchaseOrderPayment"> |
| 55 | + <argument name="purchaseOrderNumber" value="12345"/> |
| 56 | + </actionGroup> |
| 57 | + |
| 58 | + <!--Press Key ENTER--> |
| 59 | + <pressKey selector="{{StorefrontCheckoutPaymentMethodSection.purchaseOrderNumber}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/> |
| 60 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 61 | + |
| 62 | + <!--See success messages--> |
| 63 | + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/> |
| 64 | + <see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/> |
| 65 | + |
| 66 | + </test> |
| 67 | + |
| 68 | +</tests> |
0 commit comments