From e961277e586fe0c60346d243d25480c8b130d723 Mon Sep 17 00:00:00 2001 From: Tomi Virkki Date: Tue, 10 Dec 2024 17:19:57 +0200 Subject: [PATCH] test: fix a timing issue in an integration test --- test/integration/virtual-list-date-picker.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/virtual-list-date-picker.test.js b/test/integration/virtual-list-date-picker.test.js index 6e10f2a58e..4ef7ffb135 100644 --- a/test/integration/virtual-list-date-picker.test.js +++ b/test/integration/virtual-list-date-picker.test.js @@ -1,5 +1,5 @@ import { expect } from '@vaadin/chai-plugins'; -import { fixtureSync, nextRender } from '@vaadin/testing-helpers'; +import { fixtureSync, nextFrame, nextRender } from '@vaadin/testing-helpers'; import { sendKeys } from '@web/test-runner-commands'; import '@vaadin/date-picker'; import '@vaadin/virtual-list'; @@ -20,6 +20,8 @@ describe('date-picker in virtual-list', () => { it('should not navigate the virtual list items on date picker arrow keys', async () => { const [firstDatePicker] = list.querySelectorAll('vaadin-date-picker'); firstDatePicker.focus(); + await nextFrame(); + await nextFrame(); expect(firstDatePicker.parentElement.hasAttribute('focused')).to.be.true; // Select a value for the date picker using arrow keys