Skip to content

Commit 4d0f5ed

Browse files
authored
Merge pull request #2684 from magento-trigger/team3-delivery-bug-fixes
[Team 3] Bug Fixes
2 parents fbed07f + fdbc241 commit 4d0f5ed

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

app/design/adminhtml/Magento/backend/web/css/source/components/_file-uploader.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
opacity: 0;
6767
overflow: hidden;
6868
position: absolute;
69+
visibility: hidden;
6970
width: 0;
7071

7172
&:focus {
@@ -241,7 +242,7 @@
241242
}
242243
}
243244

244-
// Placeholder for multiple uploader
245+
// Placeholder for multiple uploader
245246
.file-uploader-placeholder {
246247
&.placeholder-document {
247248
.lib-icon-font(

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/client.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ define([
114114
$.ajax = jasmine.createSpy().and.callFake(function (req) {
115115
request = req.success;
116116
});
117+
jQueryMethods.notification = $.fn.notification;
117118
$.fn.notification = jasmine.createSpy();
118119
obj.urls.beforeSave = 'requestPath';
119120
obj.save();

dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,35 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/* global jQuery */
65
/* eslint-disable max-nested-callbacks */
76
define([
87
'jquery',
9-
'squire',
10-
'mage/backend/notification'
11-
], function ($, Squire) {
8+
'mage/backend/bootstrap'
9+
], function ($) {
1210
'use strict';
1311

14-
var injector = new Squire();
15-
1612
describe('mage/backend/bootstrap', function () {
17-
beforeEach(function (done) {
18-
injector.require(['mage/backend/bootstrap'], function () {
19-
done();
20-
});
13+
var $pageMainActions;
14+
15+
beforeEach(function () {
16+
$pageMainActions = $('<div class="page-main-actions"></div>');
2117
});
2218

2319
afterEach(function () {
24-
try {
25-
injector.clean();
26-
injector.remove();
27-
} catch (e) {}
20+
$pageMainActions.remove();
2821
});
2922

3023
describe('"sendPostponeRequest" method', function () {
31-
it('should insert "Error" notification if request failed', function (done) {
32-
jQuery('<div class="page-main-actions"></div>').appendTo('body');
33-
jQuery('body').notification();
24+
it('should insert "Error" notification if request failed', function () {
25+
$pageMainActions.appendTo('body');
26+
$('body').notification();
3427

35-
jQuery.ajax().abort();
28+
$.ajaxSettings.error();
3629

37-
setTimeout(function () {
38-
expect(jQuery('.message-error').length).toBe(1);
39-
expect(
40-
jQuery('body:contains("A technical problem with the server created an error")').length
41-
).toBe(1);
42-
done();
43-
}, 1);
30+
expect($('.message-error').length).toBe(1);
31+
expect(
32+
$('body:contains("A technical problem with the server created an error")').length
33+
).toBe(1);
4434
});
4535
});
4636
});

0 commit comments

Comments
 (0)