forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.4-develop' into Tier4-Kings-PR-03-21-2024
- Loading branch information
Showing
17 changed files
with
288 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminConfigurePayPalPaymentsProActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminConfigurePayPalPaymentsProActionGroup"> | ||
<annotations> | ||
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="credentials" defaultValue="SamplePaypalPaymentsProConfig"/> | ||
<argument name="countryCode" type="string" defaultValue="us"/> | ||
</arguments> | ||
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> | ||
<waitForPageLoad stepKey="waitForConfigPageLoad"/> | ||
<waitForElementClickable selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForConfigureButtonToBeClicked"/> | ||
<click selector ="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="expandOtherPaypalConfigButton"/> | ||
<scrollTo selector="{{PayPalPaymentsProConfigSection.paymentsAdvanced(countryCode)}}" stepKey="scrollToConfigure"/> | ||
<waitForElementClickable selector="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPaymentsProConfigureBtn"/> | ||
<click selector ="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/> | ||
<scrollTo selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="scrollToBottom"/> | ||
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="waitForPartner"/> | ||
<fillField selector ="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentspro_parner}}" stepKey="inputPartner"/> | ||
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.user(countryCode)}}" stepKey="waitForUser"/> | ||
<fillField selector ="{{PayPalPaymentsProConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentspro_user}}" stepKey="inputUser"/> | ||
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" stepKey="waitForVendor"/> | ||
<fillField selector ="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentspro_vendor}}" stepKey="inputVendor"/> | ||
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.password(countryCode)}}" stepKey="waitForPassword"/> | ||
<fillField selector ="{{PayPalPaymentsProConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentspro_password}}" stepKey="inputPassword"/> | ||
<selectOption selector="{{PayPalPaymentsProConfigSection.testMode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/> | ||
<selectOption selector ="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/> | ||
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveButtonBecomeClickable"/> | ||
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> | ||
<waitForPageLoad stepKey="waitForSaving"/> | ||
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/code/Magento/Paypal/Test/Mftf/Section/PayPalPaymentsProConfigSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="PayPalPaymentsProConfigSection"> | ||
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk-head" parameterized="true"/> | ||
<element name="partner" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_partner" parameterized="true"/> | ||
<element name="user" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_user" parameterized="true"/> | ||
<element name="vendor" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_vendor" parameterized="true"/> | ||
<element name="password" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_pwd" parameterized="true"/> | ||
<element name="testMode" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/> | ||
<element name="enableSolution" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/> | ||
<element name="paymentsAdvanced" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_payflow_advanced-head" parameterized="true"/> | ||
</section> | ||
</sections> |
29 changes: 29 additions & 0 deletions
29
app/code/Magento/Paypal/Test/Mftf/Suite/ConfigurePaypalPaymentsProSuite.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> | ||
<suite name="ConfigurePaypalPaymentsProSuite"> | ||
<before> | ||
<!-- Login --> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/> | ||
<!--Config PayPal Payments Pro--> | ||
<actionGroup ref="AdminConfigurePayPalPaymentsProActionGroup" stepKey="configPayPalPaymentsPro"> | ||
<argument name="credentials" value="SamplePaypalPaymentsProConfig"/> | ||
</actionGroup> | ||
</before> | ||
<after> | ||
<!-- Cleanup Paypal configurations --> | ||
<magentoCLI command="config:set payment/paypal_payment_pro/active 0" stepKey="disablePayPalPaymentsPro"/> | ||
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache"> | ||
<argument name="tags" value="config full_page"/> | ||
</actionGroup> | ||
</after> | ||
<include> | ||
<group name="paypalPaymentsPro"/> | ||
</include> | ||
</suite> | ||
</suites> |
83 changes: 83 additions & 0 deletions
83
app/code/Magento/Paypal/Test/Mftf/Test/VoidASalesOrderPlacedWithPayPalPaymentsProTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="VoidASalesOrderPlacedWithPayPalPaymentsProTest"> | ||
<annotations> | ||
<features value="PayPal"/> | ||
<stories value="Paypal Payments Pro"/> | ||
<title value="Void a Sales Order placed with PayPal Payments Pro"/> | ||
<description value="Void a Sales Order placed with PayPal Payments Pro and validate message in trasaction tab from backend "/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="AC-5461"/> | ||
<group value="paypalPaymentsPro"/> | ||
<group value="3rd_party_integration"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<!-- Go to product 1 and add it to cart --> | ||
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront"> | ||
<argument name="product" value="$$createSimpleProduct$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> | ||
<argument name="productName" value="$createSimpleProduct.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/> | ||
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> | ||
<!--Place order--> | ||
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> | ||
<argument name="shippingMethod" value="Flat Rate"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCheckoutSelectPaypalPaymentMethodActionGroup" stepKey="selectPaypalPaymentMethod"/> | ||
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> | ||
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> | ||
<argument name="cardData" value="VisaDefaultCard"/> | ||
</actionGroup> | ||
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/> | ||
<waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/> | ||
<waitForText selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessMessage"/> | ||
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumber"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/> | ||
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnRemoveButtonToUnFiltersIfPresent"/> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
<!--Open order in sales --> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> | ||
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> | ||
<argument name="orderId" value="{$grabOrderNumber}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminAssertTotalsOnOrderViewPageActionGroup" stepKey="checkSubtotal"> | ||
<argument name="subtotal" value="$123.00"/> | ||
<argument name="shippingAndHandling" value="$5.00"/> | ||
<argument name="grandTotal" value="$128.00"/> | ||
</actionGroup> | ||
<!--Void created order --> | ||
<actionGroup ref="AdminVoidPendingOrderActionGroup" stepKey="voidPendingOrder"/> | ||
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus"> | ||
<argument name="status" value="Processing"/> | ||
</actionGroup> | ||
<!--Grab transaction ids --> | ||
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForGrabLastTransactionID"/> | ||
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionID"/> | ||
<waitForElementVisible selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="waitForVoidAuthorizationNotesWithID"/> | ||
<grabTextFrom selector="{{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey="getVoidAuthorizationNotesWithID"/> | ||
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryTab"/> | ||
<waitForText selector="{{AdminOrderCommentsTabSection.authorizationNotes('Voided')}}" userInput="$getVoidAuthorizationNotesWithID" stepKey="seeOrderHistoryNotes"/> | ||
<!-- Check the last transaction of the order and validate the details for Void and Authorization--> | ||
<actionGroup ref="AdminViewTransactionsInOrderActionGroup" stepKey="validateVoidTransaction"/> | ||
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForVoid"/> | ||
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/> | ||
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButton"/> | ||
<actionGroup ref="AdminViewAuthorizationTransactionsInOrderActionGroup" stepKey="validateAuthTransaction"/> | ||
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForAuthorization"/> | ||
</test> | ||
</tests> |
23 changes: 23 additions & 0 deletions
23
...ento/Sales/Test/Mftf/ActionGroup/AdminViewAuthorizationTransactionsInOrderActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminViewAuthorizationTransactionsInOrderActionGroup" extends="AdminViewTransactionsInOrderActionGroup"> | ||
<annotations> | ||
<description>Click the Transactions button on the Order Details page and validate authorization transaction</description> | ||
</annotations> | ||
<remove keyForRemoval="selectVoidTypeTxn"/> | ||
<remove keyForRemoval="assertEquals"/> | ||
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" after="orderTransactionsTableIsVisible" stepKey="waitForTransactionTypeAuthorizationToBeClicked"/> | ||
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="authorization" after="orderTransactionsTableIsVisible" stepKey="selectAuthorizationTypeTxn" /> | ||
<assertRegExp stepKey="assertEquals" message="pass"> | ||
<expectedResult type="string">/([0-9a-z\-])*(?<!authorization)$/</expectedResult> | ||
<actualResult type="variable">getVoidTransaction</actualResult> | ||
</assertRegExp> | ||
</actionGroup> | ||
</actionGroups> |
30 changes: 30 additions & 0 deletions
30
app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminViewTransactionsInOrderActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminViewTransactionsInOrderActionGroup"> | ||
<annotations> | ||
<description>Click the Transactions button on the Order Details page</description> | ||
</annotations> | ||
<waitForElementClickable selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="waitForTransactionsTabToBeClicked"/> | ||
<click selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="clickTransactionsTab"/> | ||
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTable}}" stepKey="orderTransactionsTableIsVisible"/> | ||
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="void" stepKey="selectVoidTypeTxn" /> | ||
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="waitToClickSearch"/> | ||
<click selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="clickSearch"/> | ||
<waitForPageLoad stepKey="waitForFilterToLoad"/> | ||
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickOnVoidTransaction"/> | ||
<click selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickVoidTxn"/> | ||
<waitForPageLoad stepKey="waitForTxnToLoad"/> | ||
<grabTextFrom selector="{{AdminTransactionsGridSection.transactionData('Transaction ID')}}" stepKey="getVoidTransaction"/> | ||
<assertRegExp stepKey="assertEquals" message="pass"> | ||
<expectedResult type="string">/([0-9a-z\-])*(?<!void)$/</expectedResult> | ||
<actualResult type="variable">getVoidTransaction</actualResult> | ||
</assertRegExp> | ||
</actionGroup> | ||
</actionGroups> |
Oops, something went wrong.