From 26151144cba52855c2009f3fb39105aa9f3828b7 Mon Sep 17 00:00:00 2001 From: Anssi Juvonen Date: Fri, 13 Dec 2024 18:42:04 +0200 Subject: [PATCH] Different click approach --- e2e/log.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/log.spec.ts b/e2e/log.spec.ts index 584bdfa..cd233da 100644 --- a/e2e/log.spec.ts +++ b/e2e/log.spec.ts @@ -19,8 +19,8 @@ test.only('logs veggies', async ({page}) => { const toastLocator = page.getByTestId('toast-message'); - while ((await toastLocator.count()) > 0) { - await toastLocator.nth(0).click({force: true}); + for (let i = 0; i < (await toastLocator.count()); i++) { + await toastLocator.nth(i).click(); } await page.getByTestId('navbar-link-settings').click();