Skip to content

Commit 45e1132

Browse files
committed
Merge branch '2.4-develop' of github.com:magento-commerce/magento2ce into ims-phase1
2 parents 3c5a58f + 5d9fe40 commit 45e1132

File tree

15 files changed

+715
-46
lines changed

15 files changed

+715
-46
lines changed

app/code/Magento/Checkout/view/frontend/requirejs-config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@ var config = {
1515
proceedToCheckout: 'Magento_Checkout/js/proceed-to-checkout',
1616
catalogAddToCart: 'Magento_Catalog/js/catalog-add-to-cart'
1717
}
18+
},
19+
shim: {
20+
'Magento_Checkout/js/model/totals' : {
21+
deps: ['Magento_Customer/js/customer-data']
22+
}
1823
}
1924
};

app/code/Magento/Checkout/view/frontend/web/js/action/redirect-on-success.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ define(
2222
*/
2323
execute: function () {
2424
fullScreenLoader.startLoader();
25-
this.reloadPage();
25+
this.redirectToSuccessPage();
2626
},
2727

2828
/**
29-
* Method to reload page
29+
* Redirect to success page.
3030
*/
31-
reloadPage: function () {
31+
redirectToSuccessPage: function () {
3232
window.location.replace(url.build(this.redirectUrl));
3333
}
3434
};

app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define([
2424
messageContainer = messageContainer || globalMessageList;
2525

2626
if (response.status == 401) { //eslint-disable-line eqeqeq
27-
this.reloadPage(url.build('customer/account/login/'));
27+
this.redirectTo(url.build('customer/account/login/'));
2828
} else {
2929
try {
3030
error = JSON.parse(response.responseText);
@@ -38,9 +38,9 @@ define([
3838
},
3939

4040
/**
41-
* Method to reload page
41+
* Method to redirect by requested URL.
4242
*/
43-
reloadPage: function (redirectUrl) {
43+
redirectTo: function (redirectUrl) {
4444
window.location.replace(redirectUrl);
4545
}
4646
};

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

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/code/Magento/ProductVideo/etc/csp_whitelist.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
<value id="vimeo" type="host">vimeo.com</value>
1616
<value id="www_vimeo" type="host">www.vimeo.com</value>
1717
<value id="vimeo_cdn" type="host">*.vimeocdn.com</value>
18+
<value id="youtube" type="host">*.youtube.com</value>
1819
</values>
1920
</policy>
2021
<policy id="img-src">
2122
<values>
2223
<value id="vimeo_cdn" type="host">*.vimeocdn.com</value>
2324
<value id="youtube_image" type="host">i.ytimg.com</value>
25+
<value id="youtube" type="host">*.youtube.com</value>
2426
</values>
2527
</policy>
2628
<policy id="frame-src">

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ var config = {
4747
'jquery-ui-modules/widget': 'jquery/ui-modules/widget',
4848
'jquery-ui-modules/timepicker': 'jquery/timepicker',
4949
'vimeo': 'vimeo/player',
50-
'vimeoWrapper': 'vimeo/vimeo-wrapper',
51-
'jquery/jquery.cookie': 'js-cookie/cookie-wrapper'
50+
'vimeoWrapper': 'vimeo/vimeo-wrapper'
5251
}
5352
},
5453
shim: {
@@ -69,7 +68,8 @@ var config = {
6968
'jquery/validate': 'jquery/jquery.validate',
7069
'jquery/file-uploader': 'jquery/fileUploader/jquery.fileuploader',
7170
'prototype': 'legacy-build.min',
72-
'jquery/jquery-storageapi': 'jquery/jquery.storageapi.min',
71+
'jquery/jquery.cookie': 'js-cookie/cookie-wrapper',
72+
'jquery/jquery-storageapi': 'js-storage/storage-wrapper',
7373
'text': 'mage/requirejs/text',
7474
'domReady': 'requirejs/domReady',
7575
'spectrum': 'jquery/spectrum/spectrum',

dev/tests/js/jasmine/spec_runner/tasks/jasmine.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ function init(config) {
7070
helpers: specs,
7171
sandboxArgs: {
7272
args: ['--no-sandbox', '--disable-setuid-sandbox'],
73-
defaultViewport: {width: 400, height: 400, hasTouch: true},
74-
slowMo: 10000
73+
defaultViewport: {width: 400, height: 400, hasTouch: true}
7574
}
7675
}
7776
};

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/action/redirect-on-success.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ define([
3535
});
3636

3737
it('Checks if loader is called before redirect to success page.', function () {
38-
spyOn(RedirectOnSuccess, 'reloadPage').and.callFake(function () {});
38+
spyOn(RedirectOnSuccess, 'redirectToSuccessPage').and.callFake(function () {});
3939
RedirectOnSuccess.execute();
4040

4141
expect(FullScreenLoader.startLoader).toHaveBeenCalled();

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/error-processor.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ define([
6262
it('check on failed status', function () {
6363
var messageContainer = jasmine.createSpyObj('globalMessageList', ['addErrorMessage']);
6464

65-
spyOn(model, 'reloadPage').and.callFake(function () {});
65+
spyOn(model, 'redirectTo').and.callFake(function () {});
6666
model.process({
6767
status: 401,
6868
responseText: ''

lib/web/jquery/jquery.storageapi.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/web/js-cookie/cookie-wrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ define([
99
], function ($, cookie) {
1010
'use strict';
1111

12+
window.Cookies = window.Cookies || cookie;
13+
1214
var config = $.cookie = function (key, value, options) {
1315
if (value !== undefined) {
1416
options = $.extend({}, config.defaults, options);
@@ -36,7 +38,7 @@ define([
3638
}
3739

3840
return result;
39-
}
41+
};
4042

4143
config.defaults = {};
4244

lib/web/js-cookie/js.cookie.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)