Skip to content

Commit f15effe

Browse files
authored
Merge branch '2.4-develop' into 2.4.8-graphql-api-enhancements
2 parents b8c2e7e + f130be4 commit f15effe

7 files changed

+266
-3
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontApplyTierPriceForBundleDynamicProductTest">
12+
<annotations>
13+
<features value="Bundle Product"/>
14+
<stories value="Dynamic Bundle Product with Tier Price"/>
15+
<title value="Apply Tier price for Bundle Dynamic Product"/>
16+
<description value="Create bundled product with tier price and verify price and tier price % in customization frame in storefront."/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4051"/>
19+
</annotations>
20+
<before>
21+
<!--Create a category-->
22+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
23+
<!-- simple product1-->
24+
<createData entity="SimpleProduct" stepKey="SimpleProduct1">
25+
<field key="price">110.00</field>
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<!-- simple product2 -->
29+
<createData entity="SimpleProduct" stepKey="SimpleProduct2">
30+
<field key="price">40.00</field>
31+
<requiredEntity createDataKey="createCategory"/>
32+
</createData>
33+
<createData entity="ApiBundleProduct" stepKey="createBundleProduct">
34+
<requiredEntity createDataKey="createCategory"/>
35+
</createData>
36+
<createData entity="DropDownBundleOption" stepKey="dropDownBundleOption1">
37+
<requiredEntity createDataKey="createBundleProduct"/>
38+
</createData>
39+
<createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct1">
40+
<requiredEntity createDataKey="createBundleProduct"/>
41+
<requiredEntity createDataKey="dropDownBundleOption1"/>
42+
<requiredEntity createDataKey="SimpleProduct1"/>
43+
</createData>
44+
<createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct12">
45+
<requiredEntity createDataKey="createBundleProduct"/>
46+
<requiredEntity createDataKey="dropDownBundleOption1"/>
47+
<requiredEntity createDataKey="SimpleProduct2"/>
48+
</createData>
49+
<!-- Login as admin -->
50+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
51+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openGridForBundleProduct1"/>
52+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProduct1">
53+
<argument name="product" value="$$createBundleProduct$$"/>
54+
</actionGroup>
55+
<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openFirstProductForEdit"/>
56+
<actionGroup ref="AdminBundleProductSetAdvancedPricingActionGroup" stepKey="addProductTierPrice">
57+
<argument name="quantity" value="2"/>
58+
<argument name="price" value="Discount"/>
59+
<argument name="amount" value="20"/>
60+
<argument name="priceView" value="Price Range"/>
61+
</actionGroup>
62+
<actionGroup ref="SetCategoryByNameActionGroup" stepKey="addCategoryToBundledProduct">
63+
<argument name="categoryName" value="$$createCategory.name$$"/>
64+
</actionGroup>
65+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
66+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
67+
<argument name="indices" value=""/>
68+
</actionGroup>
69+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
70+
<argument name="tags" value="config full_page"/>
71+
</actionGroup>
72+
</before>
73+
<after>
74+
<!-- Delete the simple product -->
75+
<deleteData createDataKey="SimpleProduct1" stepKey="deleteSimpleProduct1"/>
76+
<!-- Delete the simple product -->
77+
<deleteData createDataKey="SimpleProduct2" stepKey="deleteSimpleProduct2"/>
78+
<!--Delete category-->
79+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
80+
<!--Delete Bundle Product-->
81+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
82+
<!-- Log out -->
83+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
84+
</after>
85+
<!--Open created category in storefront and assert the price-->
86+
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="againOpenEnabledCategory">
87+
<argument name="categoryName" value="$$createCategory.name$$"/>
88+
</actionGroup>
89+
<waitForText userInput="From $40.00" selector="{{StorefrontCategoryProductSection.priceFromByProductId($$createBundleProduct.id$$)}}" stepKey="seeFromPriceFromInCategoryBundle"/>
90+
<waitForText userInput="To $110.00" selector="{{StorefrontCategoryProductSection.priceToByProductId($$createBundleProduct.id$$)}}" stepKey="seeToPriceFromInCategoryBundle"/>
91+
<!--Open Bundled product-->
92+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToProduct2ProductDetailsPage">
93+
<argument name="product" value="$createBundleProduct$"/>
94+
</actionGroup>
95+
<!--Click on Customize and Add to cart-->
96+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickButtonToCustomize"/>
97+
<actionGroup ref="StorefrontSelectBundleProductDropDownOptionActionGroup" stepKey="addSimpleProduct1">
98+
<argument name="productName" value="$SimpleProduct1.name$"/>
99+
</actionGroup>
100+
<!-- Assert price and tier price %-->
101+
<waitForText userInput="$110.00" selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="seeCustomizationPrice"/>
102+
<waitForText userInput="Buy 2 with 20% discount each" selector="{{StorefrontProductInfoMainSection.tierPriceWithIndex('1')}}" stepKey="tierPriceText"/>
103+
<!-- Change qty in customization frame nd add it to cart-->
104+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
105+
<argument name="quantity" value="2"/>
106+
</actionGroup>
107+
<!--Select 2nd product in from the bundled product and add qty 2 to cart-->
108+
<actionGroup ref="StorefrontSelectBundleProductDropDownOptionActionGroup" stepKey="addSimpleProduct2">
109+
<argument name="productName" value="$SimpleProduct2.name$"/>
110+
</actionGroup>
111+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityForProduct2AndAddToTheCart">
112+
<argument name="quantity" value="2"/>
113+
</actionGroup>
114+
<!--Go to cart page and assert the discounted price-->
115+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage" />
116+
<see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$240.00"/>
117+
</test>
118+
</tests>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertActiveProductImageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<arguments>
1313
<argument name="fileName" defaultValue="magento-logo" type="string"/>
1414
</arguments>
15-
<seeElement selector="{{StorefrontProductMediaSection.productImageActive(fileName)}}" stepKey="seeActiveImageDefault"/>
15+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImageActive(fileName)}}" stepKey="seeActiveImageDefault"/>
1616
</actionGroup>
1717
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
<click selector="{{CheckoutShippingSection.shipHereButton(DE_Address_Berlin_Not_Default_Address.street[0])}}" stepKey="clickShipHere"/>
6868

6969
<!-- Click next button to open payment section -->
70+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
7071
<actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/>
72+
7173
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForShipmentPageLoad"/>
7274
<waitForElementClickable selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="waitForElementSelectPaymentSolutionToBeClickable"/>
7375
<uncheckOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution"/>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminAssertCaptureTransactionActionGroup">
11+
<annotations>
12+
<description>Click the Transactions button on the Order Details page</description>
13+
</annotations>
14+
<waitForElementClickable selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="waitForTransactionsTabToBeClicked"/>
15+
<click selector="{{AdminTransactionsGridSection.transactionsSectionBtn}}" stepKey="clickTransactionsTab"/>
16+
<waitForElementVisible selector="{{AdminTransactionsGridSection.orderTxnTable}}" stepKey="orderTransactionsTableIsVisible"/>
17+
<selectOption selector="{{AdminTransactionsGridSection.orderTxnTableTypeFilter}}" userInput="Capture" stepKey="selectCaptureTypeTxn" />
18+
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="waitToClickSearch"/>
19+
<click selector="{{AdminTransactionsGridSection.orderTxnTableSearchBtn}}" stepKey="clickSearch"/>
20+
<waitForPageLoad stepKey="waitForFilterToLoad"/>
21+
<waitForElementClickable selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickOnCaptureTransaction"/>
22+
<click selector="{{AdminTransactionsGridSection.orderTxnTableFirstRow}}" stepKey="clickCaptureTxn"/>
23+
<waitForPageLoad stepKey="waitForTxnToLoad"/>
24+
<grabTextFrom selector="{{AdminTransactionsGridSection.transactionData('Transaction ID')}}" stepKey="getCaptureTransaction"/>
25+
<assertRegExp stepKey="assertEquals" after="getCaptureTransaction" message="pass">
26+
<expectedResult type="string">/([0-9a-z\-])*(?&lt;!capture)$/</expectedResult>
27+
<actualResult type="variable">getCaptureTransaction</actualResult>
28+
</assertRegExp>
29+
</actionGroup>
30+
</actionGroups>
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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="AdminCaptureInvoiceForPaypalBillingAgreementTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Capture Order with billing agreement"/>
14+
<title value="Check Capture order placed within Billing Agreement"/>
15+
<description value="Place an order with billing agreement as payment method and Capture the Order"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4942"/>
18+
<group value="3rd_party_integration"/>
19+
</annotations>
20+
<before>
21+
<!-- Simple product is created -->
22+
<createData entity="SimpleProduct" stepKey="createProduct"/>
23+
<!-- US Customer is created -->
24+
<createData entity="Simple_US_Customer_CA" stepKey="createCustomer"/>
25+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26+
<!-- Configure PayPal Express Checkout -->
27+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress">
28+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
29+
</actionGroup>
30+
<actionGroup ref="AdminPayPalExpressCheckoutEnableBillingAgreementActionGroup" stepKey="enableBillingAgreement">
31+
<argument name="countryCode" value="us"/>
32+
</actionGroup>
33+
<magentoCLI command="config:set payment/paypal_express/allow_ba_signup auto" stepKey="enableAutoBilling"/>
34+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
35+
<argument name="tags" value="config full_page"/>
36+
</actionGroup>
37+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="runIndexCronJob">
38+
<argument name="indices" value="cataloginventory_stock"/>
39+
</actionGroup>
40+
<!-- Login to StoreFront -->
41+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
42+
<argument name="Customer" value="$$createCustomer$$"/>
43+
</actionGroup>
44+
<!-- Add product to cart -->
45+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
46+
<argument name="product" value="$$createProduct$$"/>
47+
</actionGroup>
48+
<!-- Go to Checkout Page -->
49+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
50+
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShipping"/>
51+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNext"/>
52+
<!-- Click on PayPal payment radio button -->
53+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
54+
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
55+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
56+
<!-- Login to Paypal in-context-->
57+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
58+
<!-- Click PayPal button and go back to Magento site -->
59+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
60+
</before>
61+
<after>
62+
<actionGroup ref="AdminPayPalExpressCheckoutDisableActionGroup" stepKey="disablePaypalExpressCheckout"/>
63+
<!-- Login to Paypal in-context-->
64+
<actionGroup ref="AdminClearPayPalExpressCheckoutDataActionGroup" stepKey="clearPaypalExpressCheckoutFields"/>
65+
<actionGroup ref="AdminPayPalExpressCheckoutDisableBillingAgreementActionGroup" stepKey="disableBillingAgreement">
66+
<argument name="countryCode" value="us"/>
67+
</actionGroup>
68+
<magentoCLI command="config:set payment/paypal_express/allow_ba_signup never" stepKey="disableAutoBilling"/>
69+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
70+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
71+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
72+
</after>
73+
<!-- I see order successful Page -->
74+
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertOrderSuccess"/>
75+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/>
76+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.billingAgreement}}" stepKey="waitForBillingAgreement"/>
77+
<grabTextFrom selector="{{CheckoutSuccessMainSection.billingAgreement}}" stepKey="billingAgreement"/>
78+
<assertNotEmpty stepKey="assertOrderIdIsNotEmpty">
79+
<actualResult type="const">$orderNumber</actualResult>
80+
</assertNotEmpty>
81+
<assertNotEmpty stepKey="assertBillingAgreementIsNotEmpty">
82+
<actualResult type="const">$billingAgreement</actualResult>
83+
</assertNotEmpty>
84+
<!--Go to admin sales page and open the order id-->
85+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
86+
<argument name="orderId" value="{$orderNumber}"/>
87+
</actionGroup>
88+
<!--Submit invoice-->
89+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
90+
<seeOptionIsSelected userInput="Capture Online" selector="{{AdminInvoiceTotalSection.amount}}" stepKey="seeOptionType"/>
91+
<!--Submit creating invoice into the order and assert the status of the order-->
92+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoiceIntoOrder"/>
93+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus">
94+
<argument name="status" value="Processing"/>
95+
</actionGroup>
96+
<waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForLastTransactionIDFieldToBeAppearedAfterSubmittingInvoice"/>
97+
<grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionIDForCaptured"/>
98+
<!--Open the comment history tab and assert the comment-->
99+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryAfterSubmittingInvoice"/>
100+
<waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $128.00 online. Transaction ID: &quot;{$grabLastTransactionIDForCaptured}&quot;" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/>
101+
<!-- Check the last transaction of the order and validate the details for Captured and Authorization-->
102+
<actionGroup ref="AdminViewAuthorizationTransactionsInOrderActionGroup" stepKey="validateAuthTransaction"/>
103+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForAuthorization"/>
104+
<waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/>
105+
<click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButton"/>
106+
<actionGroup ref="AdminAssertCaptureTransactionActionGroup" stepKey="validateCaptureTransaction"/>
107+
<waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="No" stepKey="seeIfClosedHeaderIsSetAsNoForCapture"/>
108+
</test>
109+
</tests>
110+

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
<actionGroup ref="AdminClickRefundOfflineOnCreditMemoDetailPageActionGroup" stepKey="clickSubmitInvoice"/>
102102
<waitForText selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the credit memo." stepKey="seeSuccessMessage"/>
103103
<waitForText selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="waitForTextOrderStatus"/>
104-
<scrollTo selector="{{AdminCreditMemosGridSection.memoId}}" stepKey="scrollToMemoId"/>
104+
<click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickCreditMemoTab"/>
105+
<waitForPageLoad stepKey="waitForTabLoad"/>
106+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToMemoId"/>
105107
<grabTextFrom selector="{{AdminCreditMemosGridSection.memoId}}" stepKey="grabMemoId"/>
106108
<actionGroup ref="AdminAssertRefundInRefundsGridActionGroup" stepKey="assertRefund">
107109
<argument name="orderId" value="{$grabOrderNumber}"/>

0 commit comments

Comments
 (0)