Skip to content

Commit dddb20e

Browse files
authored
test: replace flushGrid with nextFrame to fix local failure in Firefox (#8457)
1 parent 20ec46b commit dddb20e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/grid/test/keyboard-navigation-row-focus.common.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('keyboard navigation - row focus', () => {
144144
});
145145

146146
describe('scrolling and navigating', () => {
147-
it('should scroll focused nested row into view on arrow key', () => {
147+
it('should scroll focused nested row into view on arrow key', async () => {
148148
focusItem(0);
149149
// Expand first row
150150
right();
@@ -153,12 +153,12 @@ describe('keyboard navigation - row focus', () => {
153153
// Simulate real scrolling to get the virtualizer to render
154154
// the focused item in a different element.
155155
grid.$.table.scrollTop = grid.$.table.scrollHeight / 2;
156-
flushGrid(grid);
156+
await nextFrame();
157157
down();
158158
expect(getFocusedRowIndex(grid)).to.equal(2);
159159
});
160160

161-
it('should scroll focused nested row into view on Tab', () => {
161+
it('should scroll focused nested row into view on Tab', async () => {
162162
focusItem(0);
163163
// Expand first row
164164
right();
@@ -169,7 +169,7 @@ describe('keyboard navigation - row focus', () => {
169169
// Simulate real scrolling to get the virtualizer to render
170170
// the focused item in a different element.
171171
grid.$.table.scrollTop = grid.$.table.scrollHeight / 2;
172-
flushGrid(grid);
172+
await nextFrame();
173173
// Move focus back to items
174174
tab();
175175
expect(getFocusedRowIndex(grid)).to.equal(1);

0 commit comments

Comments
 (0)