Skip to content

Commit 953d960

Browse files
committed
ACQE-6542 : [AC-4795] Partial Capture for a sales order placed with PayPal Payflow Pro
AddedNewActionGrouptoUpdateQtyInStorefront
1 parent 4829741 commit 953d960

File tree

4 files changed

+90
-10
lines changed

4 files changed

+90
-10
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@
3636
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
3737
<element name="ProductStockUnavailable" type="text" selector="//*[text()='Out of stock']"/>
3838
<element name="listedProductOnProductPage" type="block" selector="//div[contains(@aria-labelledBy,'{{attribute_code}}')]//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
39+
<element name="clickProduct" type="button" selector="//li/a/span[text()='{{var1}}']" parameterized="true"/>
3940
</section>
4041
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAddCategoryProductToCartWithQuantityNewActionGroup">
12+
<annotations>
13+
<description>Adds the provided Product to the Cart from a Storefront Category page. Validates that the Success Message is present and correct. Updates the Product Quantity using the provided Product Quantity. Validates that the provided Quantity is present and correct in the Mini Shopping Cart.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
<argument name="quantity" defaultValue="1" type="string"/>
18+
<argument name="checkQuantity" defaultValue="1" type="string"/>
19+
</arguments>
20+
21+
<!-- <click selector="{{StorefrontCategoryProductSection.clickProduct(product.name)}}" stepKey="clickProduct"/>-->
22+
<!-- <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct"/>-->
23+
<!-- <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart"/>-->
24+
<!-- <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage"/>-->
25+
<!-- <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>-->
26+
<click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart"/>
27+
<waitForPageLoad stepKey="waitForPageLoad"/>
28+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage"/>
29+
<see selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>
30+
<seeLink stepKey="assertLinkToShoppingCart" url="{{_ENV.MAGENTO_BASE_URL}}checkout/cart/" userInput="shopping cart"/>
31+
<waitForText userInput="{{checkQuantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
32+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
33+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
34+
<doubleClick selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" stepKey="doubleClickOnQtyInput"/>
35+
<pressKey selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::DELETE]" stepKey="clearQty"/>
36+
<fillField selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" userInput="{{quantity}}" stepKey="setProductQtyToFiftyInMiniCart"/>
37+
<click selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="updateQtyInMiniCart"/>
38+
</actionGroup>
39+
</actionGroups>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="ConfigPayPalPayflowProWithoutValutSuite">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<!--Config PayPal PayFlow Pro-->
14+
<actionGroup ref="AdminPayPalPayflowProActionGroup" stepKey="ConfigPayPalPayflowPro">
15+
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
16+
</actionGroup>
17+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
18+
<argument name="tags" value="config full_page"/>
19+
</actionGroup>
20+
</before>
21+
<after>
22+
<!-- Cleanup Paypal PayflowPro configurations -->
23+
<createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/>
24+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
25+
<argument name="tags" value="config full_page"/>
26+
</actionGroup>
27+
</after>
28+
<include>
29+
<group name="paypalPayflowProWithOutVault"/>
30+
</include>
31+
</suite>
32+
</suites>

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<description value="Create partial Capture for a Paypal Payflow Pro Order and and verify the transaction status after submit the Invoice."/>
1616
<severity value="MAJOR"/>
1717
<testCaseId value="AC-4795"/>
18-
<group value="paypalPaymentsPro"/>
18+
<group value="paypalPayflowProWithOutVault"/>
1919
<group value="3rd_party_integration"/>
2020
<!-- <group value="pr_exclude" />-->
2121
</annotations>
@@ -29,7 +29,8 @@
2929
<!--Create Simple product-->
3030
<createData entity="_defaultCategory" stepKey="createCategory"/>
3131
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
32-
<field key="price">10.00</field>
32+
<!-- <field key="price">10.00</field>-->
33+
<field key="quantity">5</field>
3334
<requiredEntity createDataKey="createCategory"/>
3435
</createData>
3536
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexConfig">
@@ -43,7 +44,7 @@
4344
</before>
4445
<after>
4546
<!-- Delete product and customer-->
46-
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
47+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
4748
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
4849
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4950
<!-- Logout-->
@@ -55,13 +56,18 @@
5556
</actionGroup>
5657
<!-- <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/>-->
5758
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="amOnSimpleProductPage"/>
58-
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart">
59-
<argument name="product" value="$$createSimpleProduct$$"/>
60-
<argument name="productCount" value="1"/>
61-
</actionGroup>
59+
<!-- <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart">-->
60+
<!-- <argument name="product" value="$$createSimpleProduct$$"/>-->
61+
<!-- <argument name="productCount" value="1"/>-->
62+
<!-- </actionGroup>-->
6263
<!-- Add product 1 to cart -->
63-
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
64-
<argument name="productName" value="$$createSimpleProduct.name$$"/>
64+
<!-- <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">-->
65+
<!-- <argument name="productName" value="$$createSimpleProduct.name$$"/>-->
66+
<!-- </actionGroup>-->
67+
68+
<actionGroup ref="StorefrontAddCategoryProductToCartWithQuantityNewActionGroup" stepKey="addToCartFromStorefrontProductPage1">
69+
<argument name="product" value="$$createSimpleProduct$$"/>
70+
<argument name="quantity" value="5"/>
6571
</actionGroup>
6672
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
6773
<!-- Select shipping -->
@@ -95,6 +101,8 @@
95101
<!-- Go to invoice tab and fill data -->
96102
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/>
97103
<fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="2" stepKey="fillInvoiceQuantity"/>
104+
<waitForPageLoad stepKey="wait"/>
105+
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction1"/>
98106
<click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/>
99107
<!-- <fillField selector="{{AdminInvoiceTotalSection.invoiceComment}}" userInput="comment" stepKey="writeComment"/>-->
100108
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
@@ -107,7 +115,7 @@
107115
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionIDForCaptured"/>
108116
<!--Open the comment history tab and assert the comment-->
109117
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryAfterSubmittingInvoice"/>
110-
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $128.00 online. Transaction ID: &quot;{$grabLastTransactionIDForCaptured}&quot;" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/>
118+
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $20.00 online. Transaction ID: &quot;{$grabLastTransactionIDForCaptured}&quot;" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/>
111119

112120
<!--Go to invoice page into the order-->
113121
<actionGroup ref="GoToInvoiceIntoOrderActionGroup" stepKey="goToInvoiceIntoOrderPage"/>

0 commit comments

Comments
 (0)