Skip to content

Commit 7b65d79

Browse files
committed
MAGETWO-59587: Debugging and profiling tools for UI Components and Javascript modules
1 parent 60d05a5 commit 7b65d79

File tree

10 files changed

+41
-17
lines changed

10 files changed

+41
-17
lines changed

app/code/Magento/Ui/view/base/web/js/lib/logger/console-logger.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
16
define([
27
'./logger',
38
'./entry-factory',

app/code/Magento/Ui/view/base/web/js/lib/logger/console-output-handler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'./levels-pool'
78
], function (logLevels) {

app/code/Magento/Ui/view/base/web/js/lib/logger/entry-factory.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'./entry'
78
], function (LogEntry) {

app/code/Magento/Ui/view/base/web/js/lib/logger/entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'./levels-pool'
78
], function (logLevels) {

app/code/Magento/Ui/view/base/web/js/lib/logger/formatter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'moment',
78
'mage/utils/template'

app/code/Magento/Ui/view/base/web/js/lib/logger/levels-pool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'underscore'
78
], function (_) {

app/code/Magento/Ui/view/base/web/js/lib/logger/logger-utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([], function () {
67
'use strict';
78

app/code/Magento/Ui/view/base/web/js/lib/logger/logger.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
define([
67
'./levels-pool'
78
], function (logLevels) {
@@ -28,7 +29,7 @@ define([
2829
* @protected
2930
* @type {Number}
3031
*/
31-
this.displayLevel_ = levels.WARN;
32+
this.displayLevel_ = levels.ERROR;
3233

3334
/**
3435
* An array of display criteria.

app/code/Magento/Ui/view/base/web/js/lib/logger/message-pool.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
16
define(function () {
27
'use strict';
38

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/timeline/timeline.test.js.skip renamed to dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/timeline/timeline.test.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
/**
2-
* Copyright © Magento, Inc. All rights reserved.
2+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/* global jQuery */
6-
/* eslint-disable max-nested-callbacks */
5+
76
define([
87
'squire'
98
], function (Squire) {
109
'use strict';
1110

1211
var injector = new Squire(),
1312
mocks = {
14-
'uiRegistry': jasmine.createSpy()
13+
'Magento_Ui/js/timeline/timeline-view': jasmine.createSpy()
1514
},
1615
timeline;
1716

18-
describe('Magento_Ui/js/timeline/timeline', function () {
19-
beforeEach(function (done) {
20-
injector.mock(mocks);
21-
injector.require(['Magento_Ui/js/timeline/timeline'], function (Constr) {
22-
timeline = new Constr({
23-
provider: 'provName',
24-
name: '',
25-
index: '',
26-
links: '',
27-
listens: ''
28-
});
29-
done();
17+
beforeEach(function (done) {
18+
injector.mock(mocks);
19+
injector.require(['Magento_Ui/js/timeline/timeline', 'knockoutjs/knockout-es5'], function (Constr) {
20+
timeline = new Constr({
21+
name: '',
22+
index: '',
23+
links: '',
24+
listens: '',
25+
viewConfig: {
26+
component: '',
27+
model: ''
28+
},
29+
dndConfig: {
30+
enabled: false
31+
}
3032
});
33+
done();
3134
});
35+
});
36+
37+
describe('Magento_Ui/js/timeline/timeline', function () {
38+
3239
describe('isActive method', function () {
3340
it('record status is 1', function () {
3441
expect(timeline.isActive({

0 commit comments

Comments
 (0)