Skip to content

Commit 45a365d

Browse files
Merge branch 'ACQE-6370-2' into ACQE-functional-deployment-v7
2 parents 5f99608 + b9d8085 commit 45a365d

File tree

2 files changed

+79
-4
lines changed

2 files changed

+79
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="AdminRegisteredCustomerCheckoutUsingPayPalExpressCheckoutTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Registered Customers Paypal express checkout configuration"/>
14+
<title value="Registered Customers uses Paypal Express Checkout configuration with valid credentials"/>
15+
<description value="As a registered customer I want to be able to buy goods using PayPal express with Flat rate Shipping"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5246"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="paypalExpress"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<before>
23+
<!-- Precondition1: create Simple product -->
24+
<createData entity="simpleProductWithoutCategory" stepKey="createProduct">
25+
<field key="price">10.00</field>
26+
</createData>
27+
<!-- Precondition2: create customer -->
28+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
29+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
30+
</before>
31+
<after>
32+
<!-- delete created data -->
33+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
34+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
35+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
37+
</after>
38+
<!-- Step1: Login to storefront as a customer -->
39+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
40+
<argument name="Customer" value="$$createCustomer$$"/>
41+
</actionGroup>
42+
<!-- Step2: Add product to cart and got to checkout page -->
43+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
44+
<argument name="product" value="$$createProduct$$"/>
45+
</actionGroup>
46+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
47+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
48+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
49+
<!-- Step3&4&5: Checkout with PayPal -->
50+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
51+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
52+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
53+
<!-- Login to PayPal in-context and verify order total on PayPal page-->
54+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
55+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
56+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
57+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="{{CONST.successCheckoutEmailYouMessage}}" stepKey="seeSuccessMessage"/>
58+
<!-- Step6&7: Open order and verify amounts -->
59+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openFirstOrderPage">
60+
<argument name="orderId" value="{$grabOrderNumber}"/>
61+
</actionGroup>
62+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
63+
<argument name="status" value="{{OrderState.processing}}"/>
64+
</actionGroup>
65+
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$15.00" stepKey="checkGrandTotal"/>
66+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
67+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $15.00." stepKey="seeOrderHistoryNotes"/>
68+
<!--Open invoice tab and verify the invoice is present-->
69+
<waitForElementClickable selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="waitForInvoicesTabToBeClickable"/>
70+
<click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="clickOrderInvoicesTab"/>
71+
<waitForPageLoad stepKey="waitForInvoiceGridLoadingMask"/>
72+
<waitForText selector="{{AdminOrderDetailsMainActionsSection.invoiceTabContent1}}" userInput="{{InvoiceTabErrorMessage.error_Message}}" stepKey="verifyThereIsNoInvoiceCreated"/>
73+
</test>
74+
</tests>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!--
43
/**
5-
* Copyright © Magento, Inc. All rights reserved.
6-
* See COPYING.txt for license details.
4+
* Copyright 2020 Adobe
5+
* All Rights Reserved.
76
*/
87
-->
98

@@ -13,5 +12,7 @@
1312
<entity name="Invoice" type="Invoice">
1413
<var key="quote_id" entityKey="return" entityType="CustomerCart"/>
1514
</entity>
16-
15+
<entity name="InvoiceTabErrorMessage" type="message">
16+
<data key="error_Message">We couldn't find any records.</data>
17+
</entity>
1718
</entities>

0 commit comments

Comments
 (0)