Skip to content

Commit 3720c58

Browse files
committed
Merge remote-tracking branch 'mainline/2.3.0-release' into 2.3.0-qwerty-bugs
2 parents f5d097d + 2aa8098 commit 3720c58

File tree

6 files changed

+91
-17
lines changed

6 files changed

+91
-17
lines changed

app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"constraint": {
1717
"PRIMARY": true,
18-
"MAGENTO_BULK_UUID": true
18+
"MAGENTO_BULK_UUID": true,
19+
"MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID": true
1920
}
2021
},
2122
"magento_operation": {

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
*/
99
define([
1010
'mage/url',
11-
'Magento_Ui/js/model/messageList'
12-
], function (url, globalMessageList) {
11+
'Magento_Ui/js/model/messageList',
12+
'mage/translate'
13+
], function (url, globalMessageList, $t) {
1314
'use strict';
1415

1516
return {
@@ -25,7 +26,11 @@ define([
2526
if (response.status == 401) { //eslint-disable-line eqeqeq
2627
window.location.replace(url.build('customer/account/login/'));
2728
} else {
28-
error = JSON.parse(response.responseText);
29+
try {
30+
error = JSON.parse(response.responseText);
31+
} catch (exception) {
32+
error = $t('Something went wrong with your request. Please try again later.');
33+
}
2934
messageContainer.addErrorMessage(error);
3035
}
3136
}

app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,17 @@
1717
<description value="Verify that admin is able to upload image to CMS Page with TinyMCE3 enabled"/>
1818
<severity value="MAJOR"/>
1919
<testCaseId value="MAGETWO-95725"/>
20-
<skip>
21-
<issueId value="MAGETWO-95799"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
26-
<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>
23+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/>
2724
<!-- Choose TinyMCE3 as the default WYSIWYG editor-->
28-
<actionGroup ref="SwitchToTinyMCE3" stepKey="switchToTinyMCE3"/>
25+
<magentoCLI command="config:set cms/wysiwyg/editor Magento_Tinymce3/tinymce3Adapter" stepKey="enableTinyMCE3"/>
2926
</before>
3027
<after>
3128
<!-- Switch WYSIWYG editor to TinyMCE4-->
3229
<comment userInput="Reset editor as TinyMCE4" stepKey="chooseTinyMCE4AsEditor"/>
33-
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4"/>
30+
<magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/>
3431
<actionGroup ref="logout" stepKey="logout"/>
3532
</after>
3633
<amOnPage url="{{CmsNewPagePage.url}}" stepKey="navigateToPage2"/>
@@ -39,6 +36,7 @@
3936
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab2" />
4037
<waitForElementVisible selector="{{TinyMCESection.TinyMCE3}}" stepKey="waitForTinyMCE3"/>
4138
<seeElement selector="{{TinyMCESection.TinyMCE3}}" stepKey="seeTinyMCE3" />
39+
<wait time="3" stepKey="waiting"/>
4240
<comment userInput="Click Insert image button" stepKey="clickImageButton"/>
4341
<click selector="{{TinyMCESection.InsertImageBtnTinyMCE3}}" stepKey="clickInsertImage" />
4442
<waitForPageLoad stepKey="waitForiFrameToLoad" />

app/code/Magento/Config/Test/Mftf/ActionGroup/ConfigWYSIWYGActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<selectOption selector="{{ContentManagementSection.Switcher}}" userInput="TinyMCE 3" stepKey="switchToVersion3" />
2929
<click selector="{{ContentManagementSection.WYSIWYGOptions}}" stepKey="collapseWYSIWYGOptions" />
3030
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig" />
31+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigurationSuccessMessage"/>
3132
</actionGroup>
3233
<actionGroup name="DisabledWYSIWYG">
3334
<amOnPage url="{{ConfigurationStoresPage.url}}" stepKey="navigateToConfigurationPage" />
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
/*eslint max-nested-callbacks: 0*/
7+
define([
8+
'squire'
9+
], function (Squire) {
10+
'use strict';
11+
12+
describe('Magento_Checkout/js/model/error-processor', function () {
13+
var injector = new Squire(),
14+
mocks = {
15+
'mage/url': {
16+
/** Method stub. */
17+
build: jasmine.createSpy()
18+
},
19+
'Magento_Ui/js/model/messageList': jasmine.createSpy('globalList')
20+
},
21+
model;
22+
23+
beforeEach(function (done) {
24+
injector.mock(mocks);
25+
injector.require([
26+
'Magento_Checkout/js/model/error-processor'
27+
], function (processor) {
28+
model = processor;
29+
30+
done();
31+
});
32+
});
33+
34+
describe('Check process method', function () {
35+
it('check on success response with valid response data', function () {
36+
var messageObject = {
37+
message: 'Valid error message!'
38+
},
39+
messageContainer = jasmine.createSpyObj('globalMessageList', ['addErrorMessage']);
40+
41+
model.process({
42+
status: 200,
43+
responseText: JSON.stringify(messageObject)
44+
}, messageContainer);
45+
expect(messageContainer.addErrorMessage).toHaveBeenCalledWith(messageObject);
46+
});
47+
48+
it('check on success response with invalid response data', function () {
49+
var messageContainer = jasmine.createSpyObj('globalMessageList', ['addErrorMessage']);
50+
51+
model.process({
52+
status: 200,
53+
responseText: ''
54+
}, messageContainer);
55+
expect(messageContainer.addErrorMessage)
56+
.toHaveBeenCalledWith('Something went wrong with your request. Please try again later.');
57+
});
58+
59+
it('check on failed status', function () {
60+
var messageContainer = jasmine.createSpyObj('globalMessageList', ['addErrorMessage']);
61+
62+
spyOn(window.location, 'replace').and.callFake(function () {});
63+
model.process({
64+
status: 401,
65+
responseText: ''
66+
}, messageContainer);
67+
expect(mocks['mage/url'].build)
68+
.toHaveBeenCalled();
69+
});
70+
});
71+
});
72+
});

lib/internal/Magento/Framework/Setup/Declaration/Schema/Operations/DropReference.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,23 @@ public function __construct(DropElement $dropElement)
3535
}
3636

3737
/**
38-
* {@inheritdoc}
39-
* We can drop references and this will not cause any issues.
40-
*
41-
* @return bool
38+
* @inheritdoc
4239
*/
4340
public function isOperationDestructive()
4441
{
45-
return false;
42+
return true;
4643
}
4744

4845
/**
49-
* {@inheritdoc}
46+
* @inheritdoc
5047
*/
5148
public function getOperationName()
5249
{
5350
return self::OPERATION_NAME;
5451
}
5552

5653
/**
57-
* {@inheritdoc}
54+
* @inheritdoc
5855
*/
5956
public function doOperation(ElementHistory $elementHistory)
6057
{

0 commit comments

Comments
 (0)