From 04d2fa694a8e0b02baaf6dcabd4b882c72a4157d Mon Sep 17 00:00:00 2001 From: Brian Hann Date: Thu, 29 Jan 2015 14:09:34 -0600 Subject: [PATCH] fix(Tests): Mistakenly using classList IE9 doesn't support classList, needed to use className and split on whitespace --- test/unit/core/directives/uiGridCell.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/core/directives/uiGridCell.spec.js b/test/unit/core/directives/uiGridCell.spec.js index dca035f5a9..1621ecf8f6 100644 --- a/test/unit/core/directives/uiGridCell.spec.js +++ b/test/unit/core/directives/uiGridCell.spec.js @@ -86,7 +86,7 @@ describe('uiGridCell', function () { })); }); - it('should change a columns class when its uid changes', inject(function (gridUtil, $compile, uiGridConstants) { + iit('should change a columns class when its uid changes', inject(function (gridUtil, $compile, uiGridConstants) { // Reset the UIDs (used by columns) so they're fresh and clean gridUtil.resetUids(); @@ -110,7 +110,7 @@ describe('uiGridCell', function () { var firstCol = $(gridElm).find('.ui-grid-cell').first(); var firstHeaderCell = $(gridElm).find('.ui-grid-header-cell').first(); var classRegEx = new RegExp('^' + uiGridConstants.COL_CLASS_PREFIX); - var class1 = _(firstCol[0].classList).find(function(c) { return classRegEx.test(c); }); + var class1 = _(firstCol[0].className.split(/\s+/)).find(function(c) { return classRegEx.test(c); }); // The first column should be 100px wide because we said it should be expect(firstCol.outerWidth()).toEqual(100, 'first cell is 100px'); @@ -122,7 +122,7 @@ describe('uiGridCell', function () { var firstColAgain = $(gridElm).find('.ui-grid-cell').first(); var firstHeaderCellAgain = $(gridElm).find('.ui-grid-header-cell').first(); - var class2 = _(firstColAgain[0].classList).find(function(c) { return classRegEx.test(c); }); + var class2 = _(firstColAgain[0].className.split(/\s+/)).find(function(c) { return classRegEx.test(c); }); // The column root classes should have changed expect(class2).not.toEqual(class1);