Skip to content

Commit 04d2fa6

Browse files
committed
fix(Tests): Mistakenly using classList
IE9 doesn't support classList, needed to use className and split on whitespace
1 parent 865573c commit 04d2fa6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/core/directives/uiGridCell.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('uiGridCell', function () {
8686
}));
8787
});
8888

89-
it('should change a columns class when its uid changes', inject(function (gridUtil, $compile, uiGridConstants) {
89+
iit('should change a columns class when its uid changes', inject(function (gridUtil, $compile, uiGridConstants) {
9090
// Reset the UIDs (used by columns) so they're fresh and clean
9191
gridUtil.resetUids();
9292

@@ -110,7 +110,7 @@ describe('uiGridCell', function () {
110110
var firstCol = $(gridElm).find('.ui-grid-cell').first();
111111
var firstHeaderCell = $(gridElm).find('.ui-grid-header-cell').first();
112112
var classRegEx = new RegExp('^' + uiGridConstants.COL_CLASS_PREFIX);
113-
var class1 = _(firstCol[0].classList).find(function(c) { return classRegEx.test(c); });
113+
var class1 = _(firstCol[0].className.split(/\s+/)).find(function(c) { return classRegEx.test(c); });
114114

115115
// The first column should be 100px wide because we said it should be
116116
expect(firstCol.outerWidth()).toEqual(100, 'first cell is 100px');
@@ -122,7 +122,7 @@ describe('uiGridCell', function () {
122122

123123
var firstColAgain = $(gridElm).find('.ui-grid-cell').first();
124124
var firstHeaderCellAgain = $(gridElm).find('.ui-grid-header-cell').first();
125-
var class2 = _(firstColAgain[0].classList).find(function(c) { return classRegEx.test(c); });
125+
var class2 = _(firstColAgain[0].className.split(/\s+/)).find(function(c) { return classRegEx.test(c); });
126126

127127
// The column root classes should have changed
128128
expect(class2).not.toEqual(class1);

0 commit comments

Comments
 (0)