Skip to content

Commit bb66654

Browse files
Merge branch 'bug/39496-grouped-product-wishlist-validation' of https://github.com/Mohamed-Asar/magento2 into bug/39496-grouped-product-wishlist-validation
2 parents fa55ae7 + c8ef9e1 commit bb66654

File tree

304 files changed

+119904
-1119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+119904
-1119
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
77

88
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
9+
use Magento\Framework\View\Result\Page;
910

1011
class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification implements HttpGetActionInterface
1112
{
@@ -14,14 +15,14 @@ class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1415
*/
1516
public function execute()
1617
{
17-
$this->_view->loadLayout();
18-
$this->_setActiveMenu(
19-
'Magento_AdminNotification::system_adminnotification'
20-
)->_addBreadcrumb(
18+
/** @var Page $resultPage */
19+
$resultPage = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_PAGE);
20+
$resultPage->setActiveMenu('Magento_AdminNotification::system_adminnotification');
21+
$resultPage->addBreadcrumb(
2122
__('Messages Inbox'),
2223
__('Messages Inbox')
2324
);
24-
$this->_view->getPage()->getConfig()->getTitle()->prepend(__('Notifications'));
25-
return $this->_view->renderLayout();
25+
$resultPage->getConfig()->getTitle()->prepend(__('Notifications'));
26+
return $resultPage;
2627
}
2728
}

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontPlaceOrderBundleProductFixedPriceWithUpdatedPriceTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
115115
<!--Click next button to open payment section-->
116116
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
117+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
117118
<!--Click place order-->
118119
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
119120
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,4 +1604,8 @@
16041604
<requiredEntity type="product_option">ProductOptionField20</requiredEntity>
16051605
<requiredEntity type="product_option">ProductOptionField21</requiredEntity>
16061606
</entity>
1607+
<entity name="productWithCheckboxCustomOptions" type="product">
1608+
<var key="sku" entityType="product" entityKey="sku"/>
1609+
<requiredEntity type="product_option">ProductOptionCheckboxFor2</requiredEntity>
1610+
</entity>
16071611
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductFormData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<data key="remove_image_notice">The image cannot be removed as it has been assigned to the other image role</data>
1313
<data key="save_success">You saved the product.</data>
1414
</entity>
15+
<entity name="ProductWarningMessage" type="message">
16+
<data key="require_Message">This is a required field.</data>
17+
</entity>
1518
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,4 +447,7 @@
447447
<requiredEntity type="product_option_value">ProductValueCheckbox1</requiredEntity>
448448
<requiredEntity type="product_option_value">ProductValueCheckbox2</requiredEntity>
449449
</entity>
450+
<entity name="ProductRadioButtonType" type="product_option">
451+
<data key="type">Radio Buttons</data>
452+
</entity>
450453
</entities>

app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeContentOfWysiwygEditorForDisabledByDefaultTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.EditArea}}" stepKey="focusProductShortDescriptionWysiwyg2"/>
9999
<waitForElementVisible selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForShortDescription2" />
100100
<!-- Step-9: Change editor content into Short description -->
101-
<executeJS function="tinyMCE.get('product_form_short_description').setContent('Hello World! Short Content');" stepKey="executeJSFillContent2"/>
101+
<executeJS function="hugerte.get('product_form_short_description').setContent('Hello World! Short Content');" stepKey="executeJSFillContent2"/>
102102
<scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToDesShowHideBtn1" />
103103
<click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideEditorBtn1" />
104104
<!-- Step-10: Save entity you are editing (Short Description) -->
@@ -261,7 +261,7 @@
261261
<click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="toggleShowHiddenForCategory2"/>
262262
<waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCECategory2" />
263263
<!-- Step-9: Change content into Category -->
264-
<executeJS function="tinyMCE.get('category_form_description').setContent('Hello Category World!');" stepKey="executeJSFillContent"/>
264+
<executeJS function="hugerte.get('category_form_description').setContent('Hello Category World!');" stepKey="executeJSFillContent"/>
265265
<click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickOnShowHideEditorBtn" />
266266
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImage" />
267267
<!-- Step-10: Save entity you are editing (Category) -->
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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="StorefrontVerifyProductReorderWithCustomOptionTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Reorder product with custom option"/>
15+
<title value="Customer should be able to reorder product with a selected custom checkbox option"/>
16+
<description value="Verifies that a customer can reorder a product where one custom checkbox option was selected during the original purchase."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-13538"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<!-- Precondition: Create customer -->
23+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
24+
<!-- Step1&2&3: Create product with checkbox two custom options -->
25+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
26+
<updateData entity="productWithCheckboxCustomOptions" createDataKey="createSimpleProduct" stepKey="addCustomOptions">
27+
<requiredEntity createDataKey="createSimpleProduct"/>
28+
</updateData>
29+
</before>
30+
<after>
31+
<!-- Customer logout -->
32+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
33+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
34+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
35+
</after>
36+
<!-- Step4: Login as a customer -->
37+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
38+
<argument name="Customer" value="$createCustomer$"/>
39+
</actionGroup>
40+
<!-- Step5: Open Product Page-->
41+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
42+
<argument name="product" value="$createSimpleProduct$"/>
43+
</actionGroup>
44+
<!-- Add Product to Cart from product detail page -->
45+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
46+
<!-- see custom option validation message -->
47+
<waitForText userInput="{{ProductWarningMessage.require_Message}}" stepKey="seeRequiredField"/>
48+
<!-- Choose checkbox value1 -->
49+
<actionGroup ref="StorefrontAddSimpleProductCustomOptionCheckBoxActionGroup" stepKey="selectCustomOptionCheckBoxForValue1"/>
50+
<!-- Step6: place order -->
51+
<actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"/>
52+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="clickToProceedToCheckout"/>
53+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
54+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
55+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
56+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
57+
<!-- Step7: Go to order page -->
58+
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>
59+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu">
60+
<argument name="menu" value="{{sidebarTabMenu.my_orders}}"/>
61+
</actionGroup>
62+
<!-- Clicking View Order from My Orders Grid -->
63+
<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>
64+
<!-- Clicking on Reorder link from Order Details Tab -->
65+
<waitForElementClickable selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="waitForReorderButtonToBeClickable"/>
66+
<click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/>
67+
<actionGroup ref="StorefrontCheckoutCheckProductActionGroup" stepKey="checkProduct">
68+
<argument name="product" value="$$createSimpleProduct$$"/>
69+
<argument name="cartItem" value="SimpleCartItem"/>
70+
</actionGroup>
71+
</test>
72+
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnCatalogTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCE" />
3232
<seeElement selector="{{TinyMCESection.ShowHideBtn}}" stepKey="seeShowHideBtn" />
3333
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyTinyMCE"/>
34-
<executeJS function="tinyMCE.get('category_form_description').setContent('Hello World!');" stepKey="executeJSFillContent"/>
34+
<executeJS function="hugerte.get('category_form_description').setContent('Hello World!');" stepKey="executeJSFillContent"/>
3535
<click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideBtn" />
3636
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImage" />
3737
<seeElement selector="{{TinyMCESection.InsertImageBtn}}" stepKey="insertImage"/>

app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
<waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForDescription" />
3838
<seeElement selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="TinyMCEDescription" />
3939
<click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.EditArea}}" stepKey="focusProductDescriptionWysiwyg"/>
40-
<executeJS function="tinyMCE.get('product_form_description').setContent('Hello World!');" stepKey="executeJSFillContent1"/>
40+
<executeJS function="hugerte.get('product_form_description').setContent('Hello World!');" stepKey="executeJSFillContent1"/>
4141
<waitForElementVisible selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForShortDescription" />
4242
<seeElement selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="TinyMCEShortDescription" />
4343
<click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.EditArea}}" stepKey="focusProductShortDescriptionWysiwyg"/>
44-
<executeJS function="tinyMCE.get('product_form_short_description').setContent('Hello World! Short Content');" stepKey="executeJSFillContent2"/>
44+
<executeJS function="hugerte.get('product_form_short_description').setContent('Hello World! Short Content');" stepKey="executeJSFillContent2"/>
4545
<scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToDesShowHideBtn1" />
4646
<click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideBtn1" />
4747
<waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImage1" />

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/MediaGallerySection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<element name="UploadImageNew" type="file" selector="#upload_image"/>
2424
<element name="UploadImageSelector" type="file" selector="#fileUploader"/>
2525
<element name="UploadImageWithUploaderId" type="file" selector="#fileUploader + .uppy-Root .uppy-Dashboard-input"/>
26-
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[title='Save']"/>
26+
<element name="OkBtn" type="button" selector=".tox-dialog__footer-end button[aria-label='Save']"/>
2727
<element name="insertBtn" type="button" selector="#insert"/>
2828
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
2929
<element name="CreateFolder" type="button" selector="#new_folder" timeout="30"/>

0 commit comments

Comments
 (0)