Skip to content

Commit b78479e

Browse files
authored
Merge branch '2.4-develop' into patch-1
2 parents d4f14ae + b0eec73 commit b78479e

File tree

75 files changed

+1515
-325
lines changed

Some content is hidden

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

75 files changed

+1515
-325
lines changed

app/code/Magento/Checkout/i18n/en_US.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ Summary,Summary
176176
"We'll send your order confirmation here.","We'll send your order confirmation here."
177177
Payment,Payment
178178
"Not yet calculated","Not yet calculated"
179-
"We received your order!","We received your order!"
179+
"The order was not successful!","The order was not successful!"
180180
"Thank you for your purchase!","Thank you for your purchase!"
181181
"Password", "Password"
182182
"Something went wrong while saving the page. Please refresh the page and try again.","Something went wrong while saving the page. Please refresh the page and try again."
183183
"Item in Cart","Item in Cart"
184184
"Items in Cart","Items in Cart"
185185
"Close","Close"
186186
"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart"
187-
"You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>."
187+
"You added %1 to your <a href=""%2"">shopping cart</a>.","You added %1 to your <a href=""%2"">shopping cart</a>."

app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_failure.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<body>
1010
<referenceBlock name="page.main.title">
1111
<action method="setPageTitle">
12-
<argument translate="true" name="title" xsi:type="string">We received your order!</argument>
12+
<argument translate="true" name="title" xsi:type="string">The order was not successful!</argument>
1313
</action>
1414
</referenceBlock>
1515
<referenceContainer name="content">

app/code/Magento/Customer/view/frontend/web/js/validation.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ define([
88
], function ($, moment, utils) {
99
'use strict';
1010

11+
$.validator.addMethod(
12+
'validate-date',
13+
function (value, element, params) {
14+
var dateFormat = utils.convertToMomentFormat(params.dateFormat);
15+
16+
if (value === '') {
17+
return true;
18+
}
19+
20+
return moment(value, dateFormat, true).isValid();
21+
},
22+
$.mage.__('Invalid date')
23+
);
24+
1125
$.validator.addMethod(
1226
'validate-dob',
1327
function (value, element, params) {

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AdminAssertCategoryGridPageDetailsActionGroup.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
<description>Assert category grid page basic columns values for default category</description>
1313
</annotations>
1414

15+
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.image('1','image')}}" stepKey="assertImageColumn"/>
1516
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.path('1')}}" stepKey="assertPathColumn"/>
1617
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.name('1', 'Default Category')}}" stepKey="assertNameColumn"/>
1718
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.displayMode('1', 'PRODUCTS')}}" stepKey="assertDisplayModeColumn"/>
1819
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.products('1', '0')}}" stepKey="assertProductsColumn"/>
20+
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.inMenu('1', 'Yes')}}" stepKey="assertInMenuColumn"/>
21+
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.enabled('1', 'Yes')}}" stepKey="assertEnabledColumn"/>
1922
</actionGroup>
2023
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertAdminMediaGalleryAssetFilterPlaceHolderActionGroup">
11+
<annotations>
12+
<description>Assert asset filter placeholder value</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="filterPlaceholder" type="string"/>
16+
</arguments>
17+
18+
<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.activeFilterPlaceholder(filterPlaceholder)}}" stepKey="assertFilterPLaceHolder" />
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Section/AdminMediaGalleryCatalogUiCategoryGridSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminMediaGalleryCatalogUiCategoryGridSection">
12+
<element name="activeFilterPlaceholder" type="text" selector="//div[@class='admin__current-filters-list-wrap']//li//span[contains(text(), '{{filterPlaceholder}}')]" parameterized="true"/>
13+
<element name="image" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Image')]/preceding-sibling::th) +1]//img[contains(@src, '{{imageName}}')]" parameterized="true"/>
1214
<element name="path" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Path')]/preceding-sibling::th)]" parameterized="true"/>
1315
<element name="name" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Name')]/preceding-sibling::th) +1 ]//*[text()='{{categoryName}}']" parameterized="true"/>
1416
<element name="displayMode" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Display Mode')]/preceding-sibling::th) +1 ]//*[text()='{{productsText}}']" parameterized="true"/>
1517
<element name="products" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Products')]/preceding-sibling::th) +1 ]//*[text()='{{productsQty}}']" parameterized="true"/>
18+
<element name="inMenu" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'In Menu')]/preceding-sibling::th) +1 ]//*[text()='{{inMenuValue}}']" parameterized="true"/>
19+
<element name="enabled" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Enabled')]/preceding-sibling::th) +1 ]//*[text()='{{enabledValue}}']" parameterized="true"/>
1620
<element name="edit" type="button" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Action')]/preceding-sibling::th) +1 ]//*[text()='{{edit}}']" parameterized="true"/>
1721
</section>
1822
</sections>

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterTest.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,20 @@
6262
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid">
6363
<argument name="title" value="ImageMetadata.title"/>
6464
</actionGroup>
65+
66+
<wait time="10" stepKey="waitForBookmarkToSaveView"/>
67+
<reloadPage stepKey="reloadPage"/>
68+
<waitForPageLoad stepKey="waitForGridReloaded"/>
69+
<actionGroup ref="AdminAssertMediaGalleryFilterPlaceholderActionGroup" stepKey="assertFilterApplied">
70+
<argument name="filterPlaceholder" value="$$product.name$$"/>
71+
</actionGroup>
72+
6573
<actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/>
6674
<actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete">
6775
<argument name="imageName" value="{{ImageMetadata.title}}"/>
6876
</actionGroup>
6977
<actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/>
7078
<actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/>
71-
79+
7280
</test>
7381
</tests>

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
<actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInCategories">
5555
<argument name="entityName" value="Categories"/>
5656
</actionGroup>
57+
<actionGroup ref="AssertAdminMediaGalleryAssetFilterPlaceHolderActionGroup" stepKey="assertFilterApplied">
58+
<argument name="filterPlaceholder" value="{{UpdatedImageDetails.title}}"/>
59+
</actionGroup>
5760
<actionGroup ref="AdminMediaGalleryAssertCategoryNameInCategoryGridActionGroup" stepKey="assertCategoryInGrid">
5861
<argument name="categoryName" value="$$category.name$$"/>
5962
</actionGroup>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\MediaGalleryCatalogUi\Ui\Component\Listing\Columns;
7+
8+
use Magento\Ui\Component\Listing\Columns\Column;
9+
10+
/**
11+
* Class InMenu column for Category grid
12+
*/
13+
class InMenu extends Column
14+
{
15+
/**
16+
* Prepare data source.
17+
*
18+
* @param array $dataSource
19+
* @return array
20+
*/
21+
public function prepareDataSource(array $dataSource)
22+
{
23+
if (isset($dataSource['data']['items'])) {
24+
$fieldName = $this->getData('name');
25+
foreach ($dataSource['data']['items'] as & $item) {
26+
if (isset($item[$fieldName]) && $item[$fieldName] == 1) {
27+
$item[$fieldName] = 'Yes';
28+
} else {
29+
$item[$fieldName] = 'No';
30+
}
31+
}
32+
}
33+
34+
return $dataSource;
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\MediaGalleryCatalogUi\Ui\Component\Listing\Columns;
7+
8+
use Magento\Ui\Component\Listing\Columns\Column;
9+
10+
/**
11+
* Class IsActive column for Category grid
12+
*/
13+
class IsActive extends Column
14+
{
15+
/**
16+
* Prepare data source.
17+
*
18+
* @param array $dataSource
19+
* @return array
20+
*/
21+
public function prepareDataSource(array $dataSource)
22+
{
23+
if (isset($dataSource['data']['items'])) {
24+
$fieldName = $this->getData('name');
25+
foreach ($dataSource['data']['items'] as & $item) {
26+
if (isset($item[$fieldName]) && $item[$fieldName] == 1) {
27+
$item[$fieldName] = 'Yes';
28+
} else {
29+
$item[$fieldName] = 'No';
30+
}
31+
}
32+
}
33+
34+
return $dataSource;
35+
}
36+
}

0 commit comments

Comments
 (0)