Skip to content

Commit 6252794

Browse files
akaashakaash
authored andcommitted
Merge branch 'ACQE-5749' into ACQE-6098-functional-mainline-ce
2 parents 9484adb + a27902b commit 6252794

File tree

2 files changed

+76
-3
lines changed

2 files changed

+76
-3
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
<test name="AdminPayPalExpressCheckoutTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal express checkout configuration"/>
14+
<title value="Paypal Express Checkout configuration with valid credentials"/>
15+
<description value="Place an order using paypal express checkout as payment method"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-6149"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="paypalExpress"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<!-- Simple product is created -->
24+
<createData entity="SimpleProduct" stepKey="createProduct">
25+
<field key="price">10.00</field>
26+
</createData>
27+
<!-- US Customer is created -->
28+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
29+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
30+
</before>
31+
<after>
32+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
33+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
35+
</after>
36+
<!-- Go to StoreFront -->
37+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
38+
<!-- Add product to cart -->
39+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
40+
<argument name="product" value="$$createProduct$$"/>
41+
</actionGroup>
42+
<!-- Goto Checkout Page -->
43+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
44+
<!--Fill Shipping Address-->
45+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress">
46+
<argument name="customer" value="$$createCustomer$$" />
47+
<argument name="address" value="US_Address_TX"/>
48+
</actionGroup>
49+
<!-- Select shipping -->
50+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectShippingMethodAsFlatRate">
51+
<argument name="shippingMethodName" value="Flat Rate"/>
52+
</actionGroup>
53+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
54+
<!-- Click on PayPal payment radio button -->
55+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
56+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
57+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
58+
<!-- Login to Paypal in-context and verify order total on paypal page-->
59+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
60+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
61+
<!-- I see order successful Page -->
62+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
63+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
64+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
65+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
66+
<argument name="orderId" value="{$grabOrderNumber}"/>
67+
</actionGroup>
68+
<waitForElementVisible selector="{{AdminOrderPaymentInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForTransactionIDFieldToBeAppeared"/>
69+
<grabTextFrom selector="{{AdminOrderPaymentInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabTransactionID"/>
70+
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$15.00" stepKey="checkGrandTotal"/>
71+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
72+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $15.00. Transaction ID: &quot;{$grabTransactionID}&quot;" stepKey="seeOrderHistoryNotes"/>
73+
</test>
74+
</tests>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderPaymentInformationSection.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1110
<section name="AdminOrderPaymentInformationSection">
1211
<element name="paymentMethod" type="text" selector=".order-payment-method .order-payment-method-title"/>
1312
<element name="paymentCurrency" type="text" selector=".order-payment-method .order-payment-currency"/>
1413
<element name="paymentAdditional" type="text" selector=".order-payment-method .order-payment-additional"/>
1514
<element name="paymentInformationField" type="text" selector="//*[contains(text(),'{{paymentInformationField}}')]/following-sibling::td" parameterized="true"/>
16-
</section>
17-
</sections>
15+
</section>
16+
</sections>

0 commit comments

Comments
 (0)