From bda198529d47902b7a78fc6ad753124fd939bd18 Mon Sep 17 00:00:00 2001 From: Bobbie Goede Date: Fri, 5 Jul 2024 11:31:39 +0200 Subject: [PATCH] test: fix helper `waitForTransition` completing before transition --- specs/helper.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/helper.ts b/specs/helper.ts index 86539d5ed..828a9f846 100644 --- a/specs/helper.ts +++ b/specs/helper.ts @@ -16,6 +16,7 @@ export async function getData(page: Page, selector: string, options?: Parameters } export async function waitForTransition(page: Page, selector: string = '#nuxt-page.my-leave-active') { + await page.locator(selector).waitFor() return await page.locator(selector).waitFor({ state: 'detached' }) }