Skip to content

Commit 8660c73

Browse files
author
Gabriel Galvao da Gama
committed
Fixed static tests
1 parent 273607c commit 8660c73

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/code/Magento/Ui/view/base/web/js/grid/url-filter-applier.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
define([
77
'uiComponent',
8-
'underscore',
8+
'underscore'
99
], function (Component, _) {
1010
'use strict';
1111

@@ -15,7 +15,7 @@ define([
1515
filterKey: 'filters',
1616
searchString: location.search,
1717
modules: {
18-
filterComponent: '${ $.filterProvider }',
18+
filterComponent: '${ $.filterProvider }'
1919
}
2020
},
2121

@@ -38,12 +38,14 @@ define([
3838
var urlFilter = this.getFilterParam(this.searchString);
3939

4040
if (_.isUndefined(this.filterComponent())) {
41-
setTimeout(function () {this.apply()}.bind(this), 100);
41+
setTimeout(function () {
42+
this.apply();
43+
}.bind(this), 100);
4244
} else {
4345
if (Object.keys(urlFilter).length) {
44-
this.filterComponent().setData(urlFilter, false);
45-
this.filterComponent().apply();
46-
}
46+
this.filterComponent().setData(urlFilter, false);
47+
this.filterComponent().apply();
48+
}
4749
}
4850
},
4951

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/url-filter-applier.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ define([
2525
it('return object from url with a simple filters parameter', function () {
2626
var urlSearch = '?filters[name]=test';
2727

28-
expect(urlFilterApplierObj.getFilterParam(urlSearch)).toEqual({'name': 'test'});
28+
expect(urlFilterApplierObj.getFilterParam(urlSearch)).toEqual({
29+
'name': 'test'
30+
});
2931
});
3032
it('return object from url with multiple filters parameter', function () {
3133
var urlSearch = '?filters[name]=test&filters[qty]=1';

0 commit comments

Comments
 (0)