Skip to content

Commit f51d74f

Browse files
marcelo-portugalmportuga
authored andcommitted
chore: 🤖 ensure gridHeight is constant to avoid inconsistencies
Setting grid height prevents automatic grid heights from being generated by the tests and failing randomly.
1 parent a7111a1 commit f51d74f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎packages/cellnav/test/uiGridCellNavService.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('ui.grid.edit uiGridCellNavService', function() {
2222

2323
grid = gridClassFactory.createGrid();
2424
// throttled scrolling isn't working in tests for some reason
25+
grid.gridHeight = 30;
2526
grid.options.rowHeight = 30;
2627
grid.options.scrollDebounce = 0;
2728
grid.options.columnDefs = [
@@ -201,7 +202,7 @@ describe('ui.grid.edit uiGridCellNavService', function() {
201202
$timeout.flush();
202203

203204
expect(args.grid).toEqual(grid);
204-
expect(Math.round(args.y.percentage * 10) / 10).toBe(0.5);
205+
expect(Math.round(args.y.percentage * 10) / 10).toBe(0.4);
205206
expect(isNaN(args.x.percentage)).toEqual(true);
206207
});
207208

@@ -233,7 +234,7 @@ describe('ui.grid.edit uiGridCellNavService', function() {
233234
});
234235
$timeout.flush();
235236

236-
expect(Math.round(args.y.percentage * 10) / 10).toEqual(0.6);
237+
expect(Math.round(args.y.percentage * 10) / 10).toEqual(0.5);
237238
expect(args.x).toBe(null);
238239
});
239240

0 commit comments

Comments
 (0)