From 9cabadfec3810f42f451dd207a8b617ea97f443b Mon Sep 17 00:00:00 2001 From: Ole Christer Selvig Date: Wed, 16 Aug 2023 16:24:39 +0200 Subject: [PATCH] fix: missing awaits --- packages/core-datepicker/core-datepicker.spec.ts | 4 ++-- packages/core-toggle/core-toggle.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core-datepicker/core-datepicker.spec.ts b/packages/core-datepicker/core-datepicker.spec.ts index ede36aad..31fc0e83 100644 --- a/packages/core-datepicker/core-datepicker.spec.ts +++ b/packages/core-datepicker/core-datepicker.spec.ts @@ -298,7 +298,7 @@ test.describe('core-datepicker', () => { document.addEventListener('datepicker.change', window.captureDatepickerChange) `}) await coreDatepicker.locator('button[autofocus]').click() - page.waitForFunction('window.captureDatepickerChange') + await page.waitForFunction('window.captureDatepickerChange') expect(datePickerChanged).toBe(false) }) @@ -314,7 +314,7 @@ test.describe('core-datepicker', () => { document.addEventListener('datepicker.change', window.captureDatepickerChange) `}) await coreDatepicker.locator('button[tabindex="0"]').click() - page.waitForFunction('window.captureDatepickerChange') + await page.waitForFunction('window.captureDatepickerChange') expect(datePickerChanged).toBe(true) }) diff --git a/packages/core-toggle/core-toggle.spec.ts b/packages/core-toggle/core-toggle.spec.ts index b4c0b9d0..55af1802 100644 --- a/packages/core-toggle/core-toggle.spec.ts +++ b/packages/core-toggle/core-toggle.spec.ts @@ -156,7 +156,7 @@ test.describe('core-toggle', () => { `) expect(coreToggleButton).toBeDefined() await coreToggle.evaluate((node, newValue) => node.value = newValue, btnLabel) - expect(coreToggleButton).toHaveAttribute('aria-label', `${btnLabel},${popupLabel}`) + await expect(coreToggleButton).toHaveAttribute('aria-label', `${btnLabel},${popupLabel}`) }) })