Skip to content

Commit 7fe44bf

Browse files
committed
Merge remote-tracking branch 'mainline/2.3.1-qwerty' into MC-15033-swatches-xss-fotorama-broken
2 parents 3a772bc + 5bd8493 commit 7fe44bf

File tree

39 files changed

+173
-486
lines changed

39 files changed

+173
-486
lines changed

app/code/Magento/AuthorizenetAcceptjs/view/base/requirejs-config.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
*/
55

66
var config = {
7-
shim: {
8-
acceptjs: {
9-
exports: 'Accept'
10-
},
11-
acceptjssandbox: {
12-
exports: 'Accept'
7+
map: {
8+
'*': {
9+
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept.js',
10+
acceptjs: 'https://js.authorize.net/v1/Accept.js'
1311
}
14-
},
15-
paths: {
16-
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept',
17-
acceptjs: 'https://js.authorize.net/v1/Accept'
1812
}
1913
};

app/code/Magento/AuthorizenetAcceptjs/view/base/web/js/view/payment/acceptjs-factory.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define([
1616
dependency = 'acceptjssandbox';
1717
}
1818

19-
require([dependency], function (accept) {
19+
require([dependency], function () {
2020
var $body = $('body');
2121

2222
/*
@@ -26,7 +26,16 @@ define([
2626
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
2727
*/
2828
$body.on('handshake.acceptjs', function () {
29-
deferred.resolve(accept);
29+
/*
30+
* Accept.js doesn't return the library when loading
31+
* and requirejs "shim" can't be used because it only works with the "paths" config option
32+
* and we can't use "paths" because require will try to load ".min.js" in production
33+
* and that doesn't work because it doesn't exist
34+
* and we can't add a query string to force a URL because accept.js will reject it
35+
* and we can't include it locally because they check in the script before loading more scripts
36+
* So, we use the global version as "shim" would
37+
*/
38+
deferred.resolve(window.Accept);
3039
$body.off('handshake.acceptjs');
3140
});
3241
},

app/code/Magento/Backup/Controller/Adminhtml/Index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Backup\Controller\Adminhtml;
77

88
use Magento\Backend\App\Action;
9-
use Magento\Framework\App\Action\HttpGetActionInterface;
109
use Magento\Backup\Helper\Data as Helper;
1110
use Magento\Framework\App\ObjectManager;
1211

@@ -18,7 +17,7 @@
1817
* @since 100.0.2
1918
* @SuppressWarnings(PHPMD.AllPurposeAction)
2019
*/
21-
abstract class Index extends Action implements HttpGetActionInterface
20+
abstract class Index extends Action
2221
{
2322
/**
2423
* Authorization level of a basic admin session

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Backup\Controller\Adminhtml\Index;
87

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Filesystem;
1111

12-
class Create extends \Magento\Backup\Controller\Adminhtml\Index
12+
/**
13+
* Create backup controller
14+
*/
15+
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
1316
{
1417
/**
1518
* Create backup action.

app/code/Magento/Catalog/Model/Product/ProductFrontendAction/Synchronizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function getProductIdsByActions(array $actions)
143143
$productIds = [];
144144

145145
foreach ($actions as $action) {
146-
if (isset($action['product_id']) && is_int($action['product_id'])) {
146+
if (isset($action['product_id'])) {
147147
$productIds[] = $action['product_id'];
148148
}
149149
}

app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,15 @@ protected function setUp()
8080

8181
public function testFilterProductActions()
8282
{
83+
$typeId = 'recently_compared_product';
8384
$productsData = [
8485
1 => [
8586
'added_at' => 12,
8687
'product_id' => 1,
8788
],
8889
2 => [
8990
'added_at' => 13,
90-
'product_id' => 2,
91+
'product_id' => '2',
9192
],
9293
3 => [
9394
'added_at' => 14,
@@ -126,10 +127,12 @@ public function testFilterProductActions()
126127
$collection->expects($this->once())
127128
->method('addFilterByUserIdentities')
128129
->with(1, 34);
129-
$collection->expects($this->any())
130+
$collection->expects($this->at(1))
130131
->method('addFieldToFilter')
131-
->withConsecutive(['type_id'], ['product_id']);
132-
132+
->with('type_id', $typeId);
133+
$collection->expects($this->at(2))
134+
->method('addFieldToFilter')
135+
->with('product_id', [1, 2]);
133136
$iterator = new \IteratorIterator(new \ArrayIterator([$frontendAction]));
134137
$collection->expects($this->once())
135138
->method('getIterator')

app/code/Magento/Catalog/view/adminhtml/web/catalog/product/edit/attribute.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
define([
77
'jquery',
8-
'mage/mage'
8+
'mage/mage',
9+
'validation'
910
], function ($) {
1011
'use strict';
1112

1213
return function (config, element) {
13-
14-
$(element).mage('form').mage('validation', {
14+
$(element).mage('form').validation({
1515
validationUrl: config.validationUrl
1616
});
1717
};

app/code/Magento/Cms/Test/Mftf/Page/CmsPageEditPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
10-
<page name="CmsPageEditPage" area="admin" url="admin/cms_page/edit/page_id/{{var}}" parameterized="true">
10+
<page name="CmsPageEditPage" area="admin" url="admin/cms_page/edit/page_id/{{var}}" parameterized="true" module="Magento_Cms">
1111
<section name="CmsNewPagePageActionsSection"/>
1212
<section name="CmsNewPagePageBasicFieldsSection"/>
1313
<section name="CmsNewPagePageContentSection"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<element name="confProductSkuMessage" type="text" selector="//*[@name='configurable-matrix[{{arg}}][sku]']/following-sibling::label" parameterized="true"/>
2828
<element name="variationsSkuInputByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) input[name*='sku']" type="input" parameterized="true"/>
2929
<element name="variationsSkuInputErrorByRow" selector="[data-index='configurable-matrix'] table > tbody > tr:nth-of-type({{row}}) .admin__field-error" type="text" parameterized="true"/>
30+
<element name="variationLabel" type="text" selector="//div[@data-index='configurable-matrix']/label"/>
3031
</section>
3132
<section name="AdminConfigurableProductFormSection">
3233
<element name="productWeight" type="input" selector=".admin__control-text[name='product[weight]']"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</actionGroup>
3737

3838
<!-- assert color configurations on the admin create product page -->
39+
<dontSee selector="{{AdminProductFormConfigurationsSection.variationLabel}}" stepKey="seeLabelNotVisible"/>
3940
<seeNumberOfElements selector="{{AdminProductFormConfigurationsSection.currentVariationsRows}}" userInput="3" stepKey="seeNumberOfRows"/>
4041
<see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeAttributeName1InField"/>
4142
<see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeAttributeName2InField"/>

0 commit comments

Comments
 (0)