Skip to content

Commit 2c71c6a

Browse files
Merge branch 'ACQE-6542' into ACQE-6651_mainline_PR_deployment
2 parents 3bf8d4f + d0492b8 commit 2c71c6a

11 files changed

+250
-3
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
@@ -35,6 +35,7 @@
3535
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
3636
<element name="ProductStockUnavailable" type="text" selector="//*[text()='Out of stock']"/>
3737
<element name="listedProductOnProductPage" type="block" selector="//div[contains(@aria-labelledBy,'{{attribute_code}}')]//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
38+
<element name="clickProduct" type="button" selector="//li/a/span[text()='{{product}}']" parameterized="true"/>
3839
<element name="productCurrencyByProductName" type="text" selector="//strong[@class='product name product-item-name']//a[contains(text(),'{{productName}}')]/parent::strong/following-sibling::div[@class='price-box price-final_price']//span[@class='price' and contains(text(),'{{currencySymbol}}')]" parameterized="true"/>
3940
<element name="productPriceByProductName" type="text" selector="//strong[@class='product name product-item-name']//a[contains(text(),'{{productName}}')]/parent::strong/following-sibling::div[@class='price-box price-final_price']//span[@class='price' and contains(text(),'{{productPrice}}')]" parameterized="true"/>
4041
<element name="filterOptionCurrencySymbol" type="text" selector="//div[@class='filter-options-content']//a//span[@class='price' and contains(text(),'{{currencySymbol}}')]" parameterized="true"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminAssertInvoiceGrandTotalDetailsActionGroup">
12+
<annotations>
13+
<description>Clicks on the 'Invoice Section' Tab on Admin View Order page and Check Grand Total.</description>
14+
</annotations>
15+
<!--Go to Invoice Tab and Verify Invoice Grand Total-->
16+
<click selector="{{StorefrontOrderInvoicesSection.invoiceTab1}}" stepKey="clickInvoiceTabOnStorefront"/>
17+
<waitForElementClickable selector="{{StorefrontOrderInvoicesSection.clickView}}" stepKey="waitForViewButtonToBeClicked"/>
18+
<click selector="{{StorefrontOrderInvoicesSection.clickView}}" stepKey="clickViewButton"/>
19+
<waitForText selector="{{AdminInvoiceTotalSection.grandTotal}}" userInput="$271.00" stepKey="seeInvoiceSubTotal1"/>
20+
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClickedAfterAsserting"/>
21+
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButtonAfterAsserting"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage"/>
24+
<waitForText selector="{{StorefrontProductPageSection.messagesBlock}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>
25+
<seeLink stepKey="assertLinkToShoppingCart" url="{{_ENV.MAGENTO_BASE_URL}}checkout/cart/" userInput="shopping cart"/>
26+
<waitForText userInput="{{checkQuantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
27+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
28+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
29+
<doubleClick selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" stepKey="doubleClickOnQtyInput"/>
30+
<pressKey selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::DELETE]" stepKey="clearQty"/>
31+
<fillField selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" userInput="{{quantity}}" stepKey="setProductQtyToFiftyInMiniCart"/>
32+
<waitForElementClickable selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="waitForUpdateQtyButton"/>
33+
<click selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="updateQtyInMiniCart"/>
34+
</actionGroup>
35+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="StorefrontGoToCheckoutFromMinicartNewActionGroup">
12+
<annotations>
13+
<description>Clicks on the Storefront Mini Shopping Cart icon. Clicks on 'Proceed to Checkout'.</description>
14+
</annotations>
15+
16+
<waitForElementNotVisible selector="{{StorefrontMinicartSection.emptyCart}}" stepKey="waitUpdateQuantity"/>
17+
<waitForElementClickable selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="waitForGoToCheckoutButtonToBeClickable"/>
18+
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
19+
</actionGroup>
20+
</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="ConfigPayPalPayflowProWithoutVaultSuite">
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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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="AdminCreatePartialCaptureForSalesOrderPlacedWithPaypalPayflowProTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Create partial Capture for Order Placed with PayPal Payflow Pro"/>
15+
<description value="Create partial Capture for a Paypal Payflow Pro Order and and verify the transaction status after submit the Invoice."/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4795"/>
18+
<group value="paypalPayflowProWithOutVault"/>
19+
<group value="3rd_party_integration"/>
20+
<group value="pr_exclude" />
21+
</annotations>
22+
<before>
23+
<!--Create a customer-->
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
25+
<!--Create Simple product-->
26+
<createData entity="_defaultCategory" stepKey="createCategory"/>
27+
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
28+
<field key="quantity">5</field>
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexConfig">
32+
<argument name="indices" value=""/>
33+
</actionGroup>
34+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheConfig">
35+
<argument name="tags" value="config full_page"/>
36+
</actionGroup>
37+
<!-- Login to admin-->
38+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
39+
</before>
40+
<after>
41+
<!-- Delete product and customer-->
42+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
43+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
44+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
45+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
46+
<!-- Logout-->
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
48+
</after>
49+
<!-- Login as Customer -->
50+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
51+
<argument name="Customer" value="$$createCustomer$$"/>
52+
</actionGroup>
53+
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="amOnSimpleProductPage"/>
54+
<actionGroup ref="StorefrontAddCategoryProductToCartWithQuantityNewActionGroup" stepKey="addToCartFromStorefrontProductPage1">
55+
<argument name="product" value="$$createSimpleProduct$$"/>
56+
<argument name="quantity" value="5"/>
57+
</actionGroup>
58+
<actionGroup ref="StorefrontGoToCheckoutFromMinicartNewActionGroup" stepKey="goToCheckoutFromMinicart"/>
59+
<!-- Select shipping -->
60+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate">
61+
<argument name="shippingMethodName" value="Flat Rate"/>
62+
</actionGroup>
63+
<!-- Go to Order review -->
64+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
65+
<!-- Checkout select Credit Card (Payflow Pro) and place order-->
66+
<waitForPageLoad stepKey="waitForPaymentPageLoad"/>
67+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/>
68+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
69+
<!--Fill Card Data and place an order-->
70+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal">
71+
<argument name="cardData" value="VisaDefaultCard"/>
72+
</actionGroup>
73+
<waitForPageLoad stepKey="waitForFillCardData"/>
74+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
75+
<!-- Grab order number-->
76+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="waitForOderNumber"/>
77+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
78+
<!--Go to Admin and check order information-->
79+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
80+
<argument name="orderId" value="$grabOrderNumber"/>
81+
</actionGroup>
82+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
83+
<!-- Check status -->
84+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
85+
<argument name="status" value="Processing"/>
86+
</actionGroup>
87+
<!-- Go to invoice tab and fill data -->
88+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/>
89+
<fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="2" stepKey="fillInvoiceQuantity"/>
90+
<waitForPageLoad stepKey="wait"/>
91+
<click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/>
92+
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
93+
<!-- Assert invoice with shipment success message -->
94+
<waitForText selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/>
95+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus">
96+
<argument name="status" value="Processing"/>
97+
</actionGroup>
98+
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForLastTransactionIDFieldToBeAppearedAfterSubmittingInvoice"/>
99+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionIDForCaptured"/>
100+
<!--Open the comment history tab and assert the comment-->
101+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryAfterSubmittingInvoice"/>
102+
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $271.00 online. Transaction ID: &quot;{$grabLastTransactionIDForCaptured}&quot;" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/>
103+
<waitForElementClickable selector="{{StorefrontOrderInvoicesSection.invoiceTab1}}" stepKey="waitForInvoiceTabToBeClicked"/>
104+
<actionGroup ref="AdminAssertInvoiceGrandTotalDetailsActionGroup" stepKey="clickOnInvoiceSectionFromOrdersPage"/>
105+
<actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForAuthorization">
106+
<argument name="transactionType" value="authorization"/>
107+
<argument name="transitionTypeStatus" value="No"/>
108+
</actionGroup>
109+
<actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForCapture">
110+
<argument name="transactionType" value="capture"/>
111+
<argument name="transitionTypeStatus" value="No"/>
112+
</actionGroup>
113+
</test>
114+
</tests>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminAssertTransitionTypeStatusNewActionGroup" extends="AdminOpenTransactionsTabActionGroup">
12+
<arguments>
13+
<argument name="transitionTypeStatus" type="string"/>
14+
</arguments>
15+
<remove keyForRemoval="clickOnVoidTransaction"/>
16+
<remove keyForRemoval="clickFirstRow"/>
17+
<waitForText selector="{{AdminTransactionsGridSection.transitionStatus}}" userInput="{{transitionTypeStatus}}" stepKey="verifyTransitionTypeStatus"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickRefundOfflineOnNewMemoPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<actionGroup name="AdminClickRefundOfflineOnNewMemoPageActionGroup">
1212
<annotations>
1313
<description>Click the Refund Offline button on the New Memo page</description>
14-
</annotations>
14+
</annotations>
1515
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/>
1616
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccesMessage"/>
1717
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo." stepKey="seeSuccessMessage"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
<element name="skuColumn" type="text" selector=".order-creditmemo-tables .product-sku-block"/>
2727
<element name="childItemQtyToRefund" type="input" selector=".order-creditmemo-tables tr:nth-child({{row}}) td .qty-input" parameterized="true"/>
2828
</section>
29-
</sections>
29+
</sections>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<element name="orderTxnTableTypeFilter" type="button" selector="#order_transactions_filter_txn_type"/>
1717
<element name="orderTxnTableSearchBtn" type="button" selector="#container button[title='Search']" />
1818
<element name="transactionData" type="text" selector="//th[text()='{{transactionData}}']/following-sibling::td" parameterized="true"/>
19+
<element name="transitionStatus" type="text" selector="//div[@class='admin__data-grid-wrap admin__data-grid-wrap-static']" />
1920
</section>
20-
</sections>
21+
</sections>

0 commit comments

Comments
 (0)