Skip to content

Commit b53c6c5

Browse files
committed
MAGETWO-92549: Build stabilization
Fix LESS static failures and JSUnit test
1 parent eb6b984 commit b53c6c5

File tree

3 files changed

+18
-27
lines changed

3 files changed

+18
-27
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
opacity: 0;
6767
overflow: hidden;
6868
position: absolute;
69-
width: 0;
7069
visibility: hidden;
70+
width: 0;
7171

7272
&:focus {
7373
+ .file-uploader-button {
@@ -242,7 +242,7 @@
242242
}
243243
}
244244

245-
// Placeholder for multiple uploader
245+
// Placeholder for multiple uploader
246246
.file-uploader-placeholder {
247247
&.placeholder-document {
248248
.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)