Skip to content

Commit 323fa95

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(build): Remove Safari 7 from tests and switch $digest to "$apply" to add $$hashKey to data.
1 parent 25dbd2e commit 323fa95

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

lib/grunt/utils.js

-6
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ var util = module.exports = {
7878
base: 'SauceLabs',
7979
browserName: 'firefox'
8080
},
81-
'SL_Safari_7': {
82-
base: 'SauceLabs',
83-
browserName: 'safari',
84-
platform: 'Mac 10.9',
85-
version: '7'
86-
},
8781
'SL_Safari_8': {
8882
base: 'SauceLabs',
8983
browserName: 'safari',

src/features/resize-columns/test/resizeColumns.spec.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('ui.grid.resizeColumns', function () {
4545
grid = angular.element('<div style="width: 500px; height: 300px" ui-grid="gridOpts" ui-grid-resize-columns></div>');
4646
document.body.appendChild(grid[0]);
4747
$compile(grid)($scope);
48-
$scope.$digest();
48+
$scope.$apply();
4949
gridScope = $(grid).isolateScope();
5050
};
5151

@@ -138,7 +138,7 @@ describe('ui.grid.resizeColumns', function () {
138138

139139
firstResizer.trigger('dblclick');
140140

141-
$scope.$digest();
141+
$scope.$apply();
142142

143143
var newColWidth = $(grid).find('.' + uiGridConstants.COL_CLASS_PREFIX + '0').first().width();
144144

@@ -152,7 +152,7 @@ describe('ui.grid.resizeColumns', function () {
152152
var firstResizer = $(grid).find('[ui-grid-column-resizer]').first();
153153

154154
firstResizer.trigger(downEvent);
155-
$scope.$digest();
155+
$scope.$apply();
156156

157157
var overlay = $(grid).find('.ui-grid-resize-overlay');
158158

@@ -175,15 +175,15 @@ describe('ui.grid.resizeColumns', function () {
175175
initialX = firstResizer.position().left;
176176

177177
$(firstResizer).simulate(downEvent, { clientX: initialX });
178-
$scope.$digest();
178+
$scope.$apply();
179179

180180
// Get the overlay
181181
overlay = $(grid).find('.ui-grid-resize-overlay');
182182
initialOverlayX = $(overlay).position().left;
183183

184184
xDiff = 100;
185185
$(document).simulate(moveEvent, { clientX: initialX + xDiff });
186-
$scope.$digest();
186+
$scope.$apply();
187187
});
188188

189189
it('should add the column-resizing class to the grid', function () {
@@ -205,7 +205,7 @@ describe('ui.grid.resizeColumns', function () {
205205
describe('then releasing the mouse', function () {
206206
beforeEach(function () {
207207
$(document).simulate(upEvent, { clientX: initialX + xDiff });
208-
$scope.$digest();
208+
$scope.$apply();
209209
});
210210

211211
it('should cause the column to resize by the amount change in the X axis', function () {
@@ -261,10 +261,10 @@ describe('ui.grid.resizeColumns', function () {
261261
initialX = firstResizer.position().left;
262262

263263
$(firstResizer).simulate(downEvent, { clientX: initialX });
264-
$scope.$digest();
264+
$scope.$apply();
265265

266266
$(document).simulate(upEvent, { clientX: initialX - minWidth });
267-
$scope.$digest();
267+
$scope.$apply();
268268
});
269269

270270
it('should not go below the minWidth less border', function () {
@@ -299,7 +299,7 @@ describe('ui.grid.resizeColumns', function () {
299299
var firstResizer = $(grid).find('[ui-grid-column-resizer]').first();
300300

301301
$(firstResizer).simulate('dblclick');
302-
$scope.$digest();
302+
$scope.$apply();
303303

304304
var firstColumnUid = gridScope.grid.columns[0].uid;
305305

@@ -317,10 +317,10 @@ describe('ui.grid.resizeColumns', function () {
317317
initialX = firstResizer.position().left;
318318

319319
$(firstResizer).simulate(downEvent, { clientX: initialX });
320-
$scope.$digest();
320+
$scope.$apply();
321321

322322
$(document).simulate(upEvent, { clientX: initialX + maxWidth });
323-
$scope.$digest();
323+
$scope.$apply();
324324
});
325325

326326
it('should not go above the maxWidth', function () {

src/features/selection/test/uiGridSelectionDirective.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('ui.grid.selection uiGridSelectionDirective', function() {
1919
document.body.appendChild(elm[0]);
2020
$compile(elm)(parentScope);
2121
$timeout.flush();
22-
parentScope.$digest();
22+
parentScope.$apply();
2323

2424
return elm;
2525
}
@@ -89,7 +89,7 @@ describe('ui.grid.selection uiGridSelectionDirective', function() {
8989
parentScope.options.enableFiltering = false;
9090
elm.controller('uiGrid').grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
9191
$timeout.flush();
92-
parentScope.$digest();
92+
parentScope.$apply();
9393

9494
var noFilteringHeight = $(elm).find('.ui-grid-header').height();
9595

0 commit comments

Comments
 (0)