Skip to content

Commit c4e23d1

Browse files
committed
ACQE-5772: Registered Checkout with PayPal Payflow Pro credit card (Payment Action = Sale) and Virtual quote
1 parent be7b88d commit c4e23d1

10 files changed

+147
-16
lines changed

app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AdminPayPalPayflowProActionGroup" extends="AdminPayPalPayflowProWithValutActionGroup">
11+
<actionGroup name="AdminConfigurePayPalPayflowProActionGroup" extends="AdminPayPalPayflowProWithValutActionGroup">
1212
<annotations>
1313
<description>Go to the 'Configuration' page for 'Payment Methods'. Fill in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description>
1414
</annotations>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalPayflowProWithValutActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow pro credentials and other details. Clicks on Save.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="credentials" defaultValue="_CREDS"/>
16+
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/>
1717
<argument name="countryCode" type="string" defaultValue="us"/>
1818
</arguments>
1919
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalConfigData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,16 @@
317317
<data key="path">payment/payflowpro_cc_vault/active</data>
318318
<data key="value">0</data>
319319
</entity>
320+
<entity name="StorefrontPaypalPayflowProSalePaymentActionOptionConfigData">
321+
<data key="path">payment/payflowpro/payment_action</data>
322+
<data key="scope_id">1</data>
323+
<data key="label">No</data>
324+
<data key="value">Sale</data>
325+
</entity>
326+
<entity name="StorefrontPaypalPayflowProAuthorizationPaymentActionOptionConfigData">
327+
<data key="path">payment/payflowpro/payment_action</data>
328+
<data key="scope_id">1</data>
329+
<data key="label">No</data>
330+
<data key="value">Authorization</data>
331+
</entity>
320332
</entities>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="ConfigurePaypalPayflowProSuite">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<!--Config PayPal Payflow Pro-->
14+
<actionGroup ref="AdminConfigurePayPalPayflowProActionGroup" stepKey="configPaypalPayflowPro">
15+
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
16+
</actionGroup>
17+
</before>
18+
<after>
19+
<!-- Cleanup Paypal configurations -->
20+
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
21+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
22+
<argument name="tags" value="config full_page"/>
23+
</actionGroup>
24+
</after>
25+
<include>
26+
<group name="paypalPayflowPro"/>
27+
</include>
28+
</suite>
29+
</suites>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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="RegisteredCheckoutWithPayPalPayflowProCreditCardWithPaymentActionSaleAndVirtualQuoteTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal Payments Pro"/>
14+
<title value="Registered Checkout with PayPal Payflow Pro credit card (Payment Action = Sale) and Virtual quote"/>
15+
<description value="Registered Checkout with PayPal Payflow Pro credit card (Payment Action = Sale) with Virtual Product and assert the details in order view page."/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5685"/>
18+
<group value="paypalPayflowPro"/>
19+
</annotations>
20+
<before>
21+
<createData entity="VirtualProduct" stepKey="createVirtualProduct"/>
22+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
23+
<magentoCLI command="config:set {{StorefrontPaypalPayflowProSalePaymentActionOptionConfigData.path}} {{StorefrontPaypalPayflowProSalePaymentActionOptionConfigData.value}}" stepKey="setPaymentActionSale"/>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
</before>
26+
<after>
27+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
28+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
29+
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/>
30+
<magentoCLI command="config:set {{StorefrontPaypalPayflowProAuthorizationPaymentActionOptionConfigData.path}} {{StorefrontPaypalPayflowProAuthorizationPaymentActionOptionConfigData.value}}" stepKey="setPaymentActionAuthorization"/>
31+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
32+
</after>
33+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
34+
<argument name="Customer" value="$createCustomer$" />
35+
</actionGroup>
36+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
37+
<argument name="product" value="$$createVirtualProduct$$"/>
38+
</actionGroup>
39+
<!-- Add product to cart -->
40+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
41+
<argument name="productName" value="$createVirtualProduct.name$"/>
42+
</actionGroup>
43+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
44+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
45+
<!-- Checkout select Credit Card (Payflow Pro) and place order-->
46+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" visible="true" stepKey="selectCreditCardPaymentMethod"/>
47+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
48+
<!--Fill Card Data -->
49+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardData">
50+
<argument name="cardData" value="VisaDefaultCard"/>
51+
</actionGroup>
52+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
53+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
54+
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/>
55+
<actionGroup ref="AssertShoppingCartIsEmptyActionGroup" stepKey="seeEmptyShoppingCartAfterPlacingAnOrder"/>
56+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
57+
<argument name="orderId" value="{$grabOrderNumber}"/>
58+
</actionGroup>
59+
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$99.99" stepKey="assertGrandTotal"/>
60+
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForTransactionIDFieldToBeAppeared"/>
61+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabTransactionID"/>
62+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
63+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Captured amount of $99.99 online. Transaction ID: &quot;{$grabTransactionID}&quot;" stepKey="seeOrderHistoryNotes"/>
64+
65+
<actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPage"/>
66+
<waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask1" after="openInvoicesTabOrdersPage"/>
67+
<conditionalClick selector="{{AdminOrderInvoicesTabSection.clearFilters}}" dependentSelector="{{AdminOrderInvoicesTabSection.clearFilters}}" visible="true" stepKey="clearExistingOrderFilters"/>
68+
<waitForElementClickable selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicePageToOpen"/>
69+
<click selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="openInvoicePage"/>
70+
<waitForPageLoad stepKey="waitForInvoicePageLoad"/>
71+
<waitForText selector="{{AdminOrderInvoiceViewSection.transactionID}}" userInput="$grabTransactionID" stepKey="assertTransactionIDInInvoice"/>
72+
<waitForElementClickable selector="{{AdminInvoiceTotalSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/>
73+
<click selector="{{AdminInvoiceTotalSection.backButton}}" stepKey="clickOnBackButton"/>
74+
<actionGroup ref="AdminOpenTransactionsTabInOrderPageActionGroup" stepKey="openTransactionTabOrdersPage"/>
75+
<waitForText selector="{{AdminTransactionsGridSection.transactionId}}" userInput="$grabTransactionID" stepKey="getVoidTransaction"/>
76+
</test>
77+
</tests>

app/code/Magento/Paypal/Test/Mftf/Test/StoreFrontGuestCheckoutWithPayPalPayflowProCreditCardWithSeveralProductsTest.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,18 @@
1515
<description value="As a guest, place an order using paypal payflow pro and assert the order details in order view page in the admin site"/>
1616
<severity value="MAJOR"/>
1717
<testCaseId value="AC-5272"/>
18+
<group value="paypalPayflowPro"/>
1819
</annotations>
1920
<before>
2021
<createData entity="SimpleProduct" stepKey="createSimpleProduct1"/>
2122
<createData entity="SimpleProduct" stepKey="createSimpleProduct2"/>
2223
<createData entity="SimpleProduct" stepKey="createSimpleProduct3"/>
2324
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
2425
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25-
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="configPaypalPayflowPro">
26-
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
27-
</actionGroup>
28-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
29-
<argument name="tags" value="config full_page"/>
30-
</actionGroup>
3126
</before>
3227
<after>
3328
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
3429
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
35-
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
36-
<magentoCLI command="config:set payment/payflow_express/active 0" stepKey="disablePayPalExpress"/>
37-
<magentoCLI command="config:set payment/payflow_express_bml/active 0" stepKey="disablePayPalExpressBML"/>
38-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
39-
<argument name="tags" value="config full_page"/>
40-
</actionGroup>
4130
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4231
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/>
4332
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontAddProductToCartAndGoToCheckoutWithInvalidCreditCardTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<argument name="tags" value=""/>
3636
</actionGroup>
3737
<!-- Paypal Payflow -->
38-
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="ConfigPayflow">
38+
<actionGroup ref="AdminConfigurePayPalPayflowProActionGroup" stepKey="ConfigPayflow">
3939
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
4040
</actionGroup>
4141
</before>
@@ -65,7 +65,7 @@
6565
</actionGroup>
6666
<!-- Place Order and assert the url -->
6767
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
68-
<wait time="6" stepKey="waitForPageLoad" />
68+
<waitForPageLoad stepKey="waitForPageLoad"/>
6969
<seeCurrentUrlMatches regex="~\/checkout/#payment~" stepKey="seeCurrentUrl"/>
7070
</test>
7171
</tests>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenTransactionsTabInOrderPageActionGroup">
11+
<annotations>
12+
<description>Click the Transactions tab on the order details page</description>
13+
</annotations>
14+
<waitForElementClickable selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="waitForTransactionTabToBeClicked"/>
15+
<click selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="clickTransactionsButton"/>
16+
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTable}}" stepKey="orderTransactionsTableIsVisible"/>
17+
<waitForPageLoad stepKey="waitForFilterToLoad"/>
18+
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="waitForFirstResultOfTransactionToBeClicked"/>
19+
<click selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickOnFirstRowOfTransactionTab"/>
20+
<waitForPageLoad stepKey="waitForTxnToLoad"/>
21+
</actionGroup>
22+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="AdminOrderInvoiceViewSection">
1212
<element name="invoiceQty" type="input" selector=".input-text.admin__control-text.qty-input" timeout="30"/>
1313
<element name="updateInvoiceBtn" type="button" selector=".update-button" timeout="30"/>
14+
<element name="transactionID" type="button" selector=".invoice-information > div > table > tbody > tr:nth-child(2) > td" timeout="30"/>
1415
</section>
1516
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<element name="transactionsSectionBtn" type="button" selector="#sales_order_view_tabs_order_transactions" />
1313
<element name="orderTxnTable" type="text" selector="#order_transactions"/>
1414
<element name="orderTxnTableFirstRow" type="text" selector=".col-id.col-transaction_id.col-number" />
15+
<element name="transactionId" type="text" selector="#log_details_fieldset > table > tbody > tr:nth-child(1) > td" />
1516
<element name="orderTxnTableTypeFilter" type="button" selector="#order_transactions_filter_txn_type"/>
1617
<element name="orderTxnTableSearchBtn" type="button" selector="#container button[title='Search']" />
1718
<element name="transactionData" type="text" selector="//th[text()='{{transactionData}}']/following-sibling::td" parameterized="true"/>

0 commit comments

Comments
 (0)