Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: another attempt to stabilize grid-pro test (#8585) (CP: 24.5) #8587

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/grid-pro/test/keyboard-navigation.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from '@vaadin/chai-plugins';
import { sendKeys } from '@vaadin/test-runner-commands';
import { aTimeout, fixtureSync, nextFrame } from '@vaadin/testing-helpers';
import { aTimeout, fixtureSync, nextFrame, oneEvent } from '@vaadin/testing-helpers';
import sinon from 'sinon';
import {
createItems,
Expand All @@ -15,7 +15,7 @@ import {
describe('keyboard navigation', () => {
let grid;

beforeEach(() => {
beforeEach(async () => {
grid = fixtureSync(`
<vaadin-grid-pro>
<vaadin-grid-pro-edit-column path="name" header="Name"></vaadin-grid-pro-edit-column>
Expand All @@ -28,6 +28,8 @@ describe('keyboard navigation', () => {
};

grid.items = createItems();
// Wait for vaadin-grid-appear animation to finish
await oneEvent(grid, 'animationend');
flushGrid(grid);
});

Expand Down Expand Up @@ -93,8 +95,6 @@ describe('keyboard navigation', () => {
const secondCell = getContainerCell(grid.$.items, 2, 0);
const spy = sinon.spy(secondCell, 'focus');
await sendKeys({ press: 'Enter' });
// Wait for possible scroll to get the cell into view
await nextFrame();
expect(spy.calledOnce).to.be.true;
});

Expand Down