Skip to content

Commit e64708d

Browse files
committed
Merge remote-tracking branch 'origin/MC-36777' into 2.4-develop-pr83
2 parents 2dee2d4 + fade205 commit e64708d

File tree

8 files changed

+90
-123
lines changed

8 files changed

+90
-123
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
<deleteData createDataKey="category3" stepKey="deleteCategory3"/>
3535
<deleteData createDataKey="category2" stepKey="deleteCategory2"/>
3636
<deleteData createDataKey="category1" stepKey="deleteCategory1"/>
37+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanInvalidatedCaches">
38+
<argument name="tags" value="full_page"/>
39+
</actionGroup>
3740
</after>
3841
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStorefrontPage"/>
3942
<moveMouseOver

app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ require([
135135
content: "{$block->escapeJs(__('Are you sure you want to strip tags?'))}",
136136
actions: {
137137
confirm: function () {
138-
this.unconvertedText = $('template_text').value;
138+
self.unconvertedText = $('template_text').value;
139139
$('convert_button').hide();
140140
$('template_text').value = $('template_text').value.stripScripts().replace(
141141
new RegExp('<style[^>]*>[\\S\\s]*?</style>', 'img'), ''

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<description value="Users are able to place order using Paypal Smart Button on Checkout Page, payment action is Sale"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-13690"/>
19+
<skip>
20+
<issueId value="MC-37236"/>
21+
</skip>
1922
<group value="paypalExpress"/>
2023
</annotations>
2124
<before>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<description value="Users are able to place order using Paypal Smart Button using Euro currency and merchant country is France"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MC-33274"/>
19+
<skip>
20+
<issueId value="MC-37236"/>
21+
</skip>
1922
<group value="paypalExpress"/>
2023
</annotations>
2124
<before>

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -184,61 +184,4 @@ protected function assertResponseFields($actualResponse, $assertionMap)
184184
);
185185
}
186186
}
187-
188-
/**
189-
* Compare arrays recursively regardless of nesting.
190-
*
191-
* Can compare arrays that have both one level and n-level nesting.
192-
* ```
193-
* [
194-
* 'products' => [
195-
* 'items' => [
196-
* [
197-
* 'sku' => 'bundle-product',
198-
* 'type_id' => 'bundle',
199-
* 'items' => [
200-
* [
201-
* 'title' => 'Bundle Product Items',
202-
* 'sku' => 'bundle-product',
203-
* 'options' => [
204-
* [
205-
* 'price' => 2.75,
206-
* 'label' => 'Simple Product',
207-
* 'product' => [
208-
* 'name' => 'Simple Product',
209-
* 'sku' => 'simple',
210-
* ]
211-
* ]
212-
* ]
213-
* ]
214-
* ];
215-
* ```
216-
*
217-
* @param array $expected
218-
* @param array $actual
219-
* @return array
220-
*/
221-
public function compareArraysRecursively(array $expected, array $actual): array
222-
{
223-
$diffResult = [];
224-
225-
foreach ($expected as $key => $value) {
226-
if (array_key_exists($key, $actual)) {
227-
if (is_array($value)) {
228-
$recursiveDiff = $this->compareArraysRecursively($value, $actual[$key]);
229-
if (!empty($recursiveDiff)) {
230-
$diffResult[$key] = $recursiveDiff;
231-
}
232-
} else {
233-
if (!in_array($value, $actual, true)) {
234-
$diffResult[$key] = $value;
235-
}
236-
}
237-
} else {
238-
$diffResult[$key] = $value;
239-
}
240-
}
241-
242-
return $diffResult;
243-
}
244187
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/BundleProductMultipleOptionsTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@
77

88
namespace Magento\GraphQl\Bundle;
99

10+
use Magento\TestFramework\Helper\Bootstrap;
11+
use Magento\TestFramework\Helper\CompareArraysRecursively;
1012
use Magento\TestFramework\TestCase\GraphQlAbstract;
1113

1214
/**
1315
* Bundle product with multiple options test.
1416
*/
1517
class BundleProductMultipleOptionsTest extends GraphQlAbstract
1618
{
19+
/**
20+
* @var CompareArraysRecursively
21+
*/
22+
private $compareArraysRecursively;
23+
24+
/**
25+
* @inheritDoc
26+
*/
27+
protected function setUp(): void
28+
{
29+
$objectManager = Bootstrap::getObjectManager();
30+
$this->compareArraysRecursively = $objectManager->create(CompareArraysRecursively::class);
31+
}
32+
1733
/**
1834
* @magentoApiDataFixture Magento/Bundle/_files/product_with_multiple_options.php
1935
* @param array $bundleProductDataProvider
@@ -85,7 +101,7 @@ private function assertBundleProduct(array $response, array $bundleProductDataPr
85101
$productItems = $response['products']['items'];
86102

87103
foreach ($bundleProductDataProvider as $key => $data) {
88-
$diff = $this->compareArraysRecursively($data, $productItems[$key]);
104+
$diff = $this->compareArraysRecursively->execute($data, $productItems[$key]);
89105
self::assertEquals([], $diff, "Actual response doesn't equal to expected data");
90106
}
91107
}

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/masonry.test.js

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -6,79 +6,78 @@
66
/*eslint max-nested-callbacks: 0*/
77
define([
88
'jquery',
9-
'ko',
109
'Magento_Ui/js/grid/masonry'
11-
], function ($, ko, Masonry) {
10+
], function ($, Masonry) {
1211
'use strict';
1312

14-
var Component,
15-
rows,
16-
container = '<div data-id="masonry_grid" id="masonry_grid"><div class="masonry-image-column"></div></div>';
13+
describe('Magento_Ui/js/grid/masonry', function () {
14+
var Component,
15+
rows,
16+
container = '<div data-id="masonry_grid" id="masonry_grid"><div class="masonry-image-column"></div></div>';
1717

18-
beforeEach(function () {
19-
rows = [
20-
{
21-
_rowIndex: 0,
22-
category: {},
23-
'category_id': 695,
24-
'category_name': 'People',
25-
'comp_url': 'https://stock.adobe.com/Rest/Libraries/Watermarked/Download/327515738/2',
26-
'content_type': 'image/jpeg',
27-
'country_name': 'Malaysia',
28-
'creation_date': '2020-03-02 10:41:51',
29-
'creator_id': 208217780,
30-
'creator_name': 'NajmiArif',
31-
height: 3264,
32-
id: 327515738,
33-
'id_field_name': 'id',
34-
'is_downloaded': 0,
35-
'is_licensed_locally': 0,
36-
keywords: [],
37-
'media_type_id': 1,
38-
overlay: '',
39-
path: '',
40-
'premium_level_id': 0,
41-
'thumbnail_240_url': 'https://t4.ftcdn.net/jpg/03/27/51/57/240_F_327515738_n.jpg',
42-
'thumbnail_500_ur': 'https://as2.ftcdn.net/jpg/03/27/51/57/500_F_327515738_n.jpg',
43-
title: 'Neon effect picture of man wearing medical mask for viral or pandemic disease',
44-
width: 4896
45-
}
18+
beforeEach(function () {
19+
rows = [
20+
{
21+
_rowIndex: 0,
22+
category: {},
23+
'category_id': 695,
24+
'category_name': 'People',
25+
'comp_url': 'url',
26+
'content_type': 'image/jpeg',
27+
'country_name': 'Malaysia',
28+
'creation_date': '2020-03-02 10:41:51',
29+
'creator_id': 208217780,
30+
'creator_name': 'NajmiArif',
31+
height: 3264,
32+
id: 327515738,
33+
'id_field_name': 'id',
34+
'is_downloaded': 0,
35+
'is_licensed_locally': 0,
36+
keywords: [],
37+
'media_type_id': 1,
38+
overlay: '',
39+
path: '',
40+
'premium_level_id': 0,
41+
'thumbnail_240_url': 'url',
42+
'thumbnail_500_ur': 'url',
43+
title: 'Neon effect picture of man wearing medical mask for viral or pandemic disease',
44+
width: 4896
45+
}
46+
];
4647

47-
];
48-
49-
$(container).appendTo('body');
50-
51-
Component = new Masonry({
52-
defaults: {
53-
rows: ko.observable()
54-
}
48+
$(document.body).append(container);
49+
Component = new Masonry({
50+
defaults: {
51+
containerId: '#masonry_grid'
52+
}
53+
});
5554
});
5655

57-
});
58-
59-
afterEach(function () {
60-
$('#masonry_grid').remove();
61-
});
56+
afterEach(function () {
57+
Component.clear();
58+
$('#masonry_grid').remove();
59+
});
6260

63-
describe('check initComponent', function () {
64-
it('verify setLayoutstyles called and grid iniztilized', function () {
65-
var setlayoutStyles = spyOn(Component, 'setLayoutStyles');
61+
describe('check initComponent', function () {
62+
it('verify setLayoutstyles called and grid iniztilized', function () {
63+
var setlayoutStyles = spyOn(Component, 'setLayoutStyles');
6664

67-
expect(Component).toBeDefined();
68-
Component.containerId = 'masonry_grid';
69-
Component.initComponent(rows);
70-
Component.rows().forEach(function (image) {
71-
expect(image.styles).toBeDefined();
72-
expect(image.css).toBeDefined();
65+
expect(Component).toBeDefined();
66+
Component.containerId = 'masonry_grid';
67+
Component.initComponent(rows);
68+
Component.rows().forEach(function (image) {
69+
expect(image.styles).toBeDefined();
70+
expect(image.css).toBeDefined();
71+
});
72+
expect(setlayoutStyles).toHaveBeenCalled();
7373
});
74-
expect(setlayoutStyles).toHaveBeenCalled();
75-
});
76-
it('verify events triggered', function () {
77-
var setLayoutStyles = spyOn(Component, 'setLayoutStyles');
74+
it('verify events triggered', function () {
75+
var setLayoutStyles = spyOn(Component, 'setLayoutStyles');
7876

79-
Component.initComponent(rows);
80-
window.dispatchEvent(new Event('resize'));
81-
expect(setLayoutStyles).toHaveBeenCalled();
77+
Component.initComponent(rows);
78+
window.dispatchEvent(new Event('resize'));
79+
expect(setLayoutStyles).toHaveBeenCalled();
80+
});
8281
});
8382
});
8483
});

package.json.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"grunt-contrib-connect": "~1.0.2",
1919
"grunt-contrib-cssmin": "~2.2.1",
2020
"grunt-contrib-imagemin": "~2.0.1",
21-
"grunt-contrib-jasmine": "~1.1.0",
21+
"grunt-contrib-jasmine": "~1.2.0",
2222
"grunt-contrib-less": "~1.4.1",
2323
"grunt-contrib-watch": "~1.0.0",
2424
"grunt-eslint": "~20.1.0",
@@ -39,4 +39,4 @@
3939
"time-grunt": "~1.4.0",
4040
"underscore": "~1.8.0"
4141
}
42-
}
42+
}

0 commit comments

Comments
 (0)