Skip to content

Commit 481edc4

Browse files
authored
Merge branch '2.4-develop' into patch-3
2 parents 6c8f11f + d06337a commit 481edc4

File tree

87 files changed

+1841
-351
lines changed

Some content is hidden

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

87 files changed

+1841
-351
lines changed

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<meta name="viewport" content="width=1024"/>
1212
<meta name="format-detection" content="telephone=no"/>
1313
<link src="requirejs/require.js"/>
14-
<css src="extjs/resources/css/ext-all.css"/>
15-
<css src="extjs/resources/css/ytheme-magento.css"/>
1614
</head>
1715
<body>
1816
<attribute name="id" value="html-body"/>

app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ public function getCalendarDateHtml()
9393
$yearStart = $this->_catalogProductOptionTypeDate->getYearStart();
9494
$yearEnd = $this->_catalogProductOptionTypeDate->getYearEnd();
9595

96-
$dateFormat = $this->_localeDate->getDateFormatWithLongYear();
96+
$fieldsSeparator = '/';
97+
$fieldsOrder = $this->_catalogProductOptionTypeDate->getConfigData('date_fields_order') ?? '';
98+
$fieldsOrder = str_replace(",", $fieldsSeparator, $fieldsOrder);
99+
$dateFormat = $fieldsOrder !== "m/d/y" ? $fieldsOrder : $this->_localeDate->getDateFormatWithLongYear();
97100
/** Escape RTL characters which are present in some locales and corrupt formatting */
98101
$escapedDateFormat = preg_replace('/[^MmDdYy\/\.\-]/', '', $dateFormat);
99102
$value = null;

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ private function getCollectionProcessor()
813813
{
814814
if (!$this->collectionProcessor) {
815815
$this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
816-
// phpstan:ignore "Class Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor not found."
816+
// @phpstan-ignore-next-line - this is a virtual type defined in di.xml
817817
\Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor::class
818818
);
819819
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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="AdminAddCustomizableOptionToSimpleProductActionGroup">
12+
<annotations>
13+
<description value="Add a custom option of type date to simple product." />
14+
</annotations>
15+
16+
<click selector="{{AdminProductCustomizableOptionSection.customizableOptionsToggle}}" stepKey="expandCustomOptions"/>
17+
<scrollTo selector="{{AdminProductCustomizableOptionSection.customizableOptionsToggle}}" stepKey="scrollToCustomizableOptions"/>
18+
19+
<click selector="{{AdminProductCustomizableOptionSection.addButtonOption}}" stepKey="clickAddButtonOption"/>
20+
<waitForElementVisible selector="{{AdminProductCustomizableOptionSection.customOptionXTitle}}" stepKey="waitForOptions"/>
21+
<fillField selector="{{AdminProductCustomizableOptionSection.customOptionXTitle}}" userInput="custom option 1" stepKey="fillOptionTitle"/>
22+
23+
<click selector="{{AdminProductCustomizableOptionSection.customOptionSelectType}}" stepKey="selectType"/>
24+
<click selector="{{AdminProductCustomizableOptionSection.customOptionSelectField}}" stepKey="selectField"/>
25+
<click selector="{{AdminProductCustomizableOptionSection.uncheckRequired}}" stepKey="uncheckRequired"/>
26+
<fillField selector="{{AdminProductCustomizableOptionSection.customizableOptionPrice}}" userInput="0" stepKey="fillPrice"/>
27+
28+
<waitForElementVisible selector="{{AdminProductCustomizableOptionSection.save}}" stepKey="waitForSaveButton"/>
29+
<click selector="{{AdminProductCustomizableOptionSection.save}}" stepKey="clickSaveButton"/>
30+
<waitForPageLoad stepKey="waitForAttributeToSave"/>
31+
<seeElement selector="{{AdminProductCustomizableOptionSection.successMessage}}" stepKey="seeSuccessMessage"/>
32+
</actionGroup>
33+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminAddTextSwatchForAdminActionGroup">
12+
<annotations>
13+
<description>Admin add texual swatch for admin.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="position" type="string"/>
17+
<argument name="swatchName" type="string"/>
18+
<argument name="swatchDescription" type="string"/>
19+
</arguments>
20+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
21+
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForAdmin"/>
22+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
23+
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForAdmin"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminAddTextSwatchForStoreViewActionGroup">
12+
<annotations>
13+
<description>Admin add texual swatch for storeview.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="position" type="string"/>
17+
<argument name="swatchName" type="string"/>
18+
<argument name="swatchDescription" type="string"/>
19+
</arguments>
20+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
21+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForStoreView"/>
22+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
23+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForStoreView"/>
24+
</actionGroup>
25+
</actionGroups>
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="AdminConfigExpandDateAndTimeTabActionGroup">
12+
<annotations>
13+
<description>Expand date and time options tab.</description>
14+
</annotations>
15+
16+
<scrollTo selector="{{CatalogSection.dateAndTimeCustomOptions}}" stepKey="scrollDownToDateAndTime"/>
17+
<conditionalClick selector="{{CatalogSection.dateAndTimeCustomOptions}}" dependentSelector="{{CatalogSection.CheckIfTabExpandForDateAndTimeCustomOptions}}" visible="true" stepKey="expandDateAndTimeCustomOptionsTab"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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="AssertProductDateFormatInStorefrontActionGroup">
12+
<annotations>
13+
<description value="Go to product page on the storefront and assert sku and custom option date format"/>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="product"/>
18+
</arguments>
19+
20+
<!-- Go to storefront product page, assert product sku and date custom option -->
21+
<amOnPage url="{{product.urlKey}}.html" stepKey="navigateToProductPage"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
24+
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
25+
26+
<click selector="{{StorefrontProductInfoMainSection.productCalenderButton}}" stepKey="clickCalenderButton"/>
27+
<click selector="{{StorefrontProductInfoMainSection.productCalenderGoToday}}" stepKey="clickCalenderGoTodayButton"/>
28+
29+
<generateDate date="Now" format="j/n/Y" stepKey="currentDate"/>
30+
31+
<executeJS function="
32+
var xpath = '{{StorefrontProductInfoMainSection.customDateField}}';
33+
var result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
34+
var element = result.singleNodeValue;
35+
return element.value;
36+
" stepKey="dateValue"/>
37+
38+
<assertEquals stepKey="assertDateFormat">
39+
<actualResult type="variable">dateValue</actualResult>
40+
<expectedResult type="variable">currentDate</expectedResult>
41+
</assertEquals>
42+
43+
</actionGroup>
44+
</actionGroups>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="FilterProductGridByProductNameActionGroup">
12+
<annotations>
13+
<description>Filters the Admin Products grid by the provided Product (Name).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
19+
<waitForElementClickable selector="{{AdminProductGridFilterSection.filters}}" stepKey="openForFilterField"/>
20+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
21+
<waitForElementVisible selector="{{AdminProductGridFilterSection.nameFilter}}" stepKey="waitForFilterFieldToBecomeActive"/>
22+
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{productName}}" stepKey="fillProductName"/>
23+
<waitForElementClickable selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="waitToClickApplyFilter"/>
24+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
25+
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
26+
</actionGroup>
27+
</actionGroups>
28+
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="SelectDropdownDateAndTimeActionGroup">
12+
<annotations>
13+
<description>Select options for Use JavaScript Calendar and Date Fields Order dropdown</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="useJsCalender" type="string"/>
18+
<argument name="firstFieldOfDateOrder" type="string"/>
19+
<argument name="secondFieldOfDateOrder" type="string"/>
20+
<argument name="thirdFieldOfDateOrder" type="string" defaultValue="Year"/>
21+
</arguments>
22+
23+
<selectOption selector="{{AdminCustomizeDateAndTimeSection.dateAndTimeJsCalenderStatus}}"
24+
userInput="{{useJsCalender}}" stepKey="selectJsCalender" />
25+
<selectOption selector="{{AdminCustomizeDateAndTimeSection.dateAndTimeFirstFieldOrder}}"
26+
userInput="{{firstFieldOfDateOrder}}" stepKey="selectFirstFieldOrder" />
27+
<selectOption selector="{{AdminCustomizeDateAndTimeSection.dateAndTimeSecondFieldOrder}}"
28+
userInput="{{secondFieldOfDateOrder}}" stepKey="selectSecondFieldOrder" />
29+
<selectOption selector="{{AdminCustomizeDateAndTimeSection.dateAndTimeThirdFieldOrder}}"
30+
userInput="{{thirdFieldOfDateOrder}}" stepKey="selectThirdFieldOrder" />
31+
</actionGroup>
32+
</actionGroups>

0 commit comments

Comments
 (0)