Skip to content

Commit fad6db4

Browse files
MAGETWO-71835: [Product grid] SC's values aren't sorted alphabetically in the tooltip
- Add js unit test
1 parent d9aa6f3 commit fad6db4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/columns/expandable.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,22 @@ define([
6969
expect(expandable.getLabel).toHaveBeenCalled();
7070
});
7171
});
72+
73+
describe('getLabelsArray method', function () {
74+
it('check if label array sort alphabetically case insensitive', function () {
75+
record['shared_catalog'].push(1, 2 , 3);
76+
expandable.options.push({
77+
label: 'Default',
78+
value: '1'
79+
}, {
80+
label: 'Label',
81+
value: '2'
82+
}, {
83+
label: 'default',
84+
value: '3'
85+
});
86+
expect(expandable.getLabelsArray(record)).toEqual(['Default', 'default', 'Label']);
87+
});
88+
});
7289
});
7390
});

0 commit comments

Comments
 (0)