From c123e60ff45d2876ec796e3c4c8b343c094c89dc Mon Sep 17 00:00:00 2001 From: Anssi Juvonen Date: Fri, 13 Dec 2024 18:47:51 +0200 Subject: [PATCH] More debugging --- e2e/log.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/e2e/log.spec.ts b/e2e/log.spec.ts index cd233da..f90a651 100644 --- a/e2e/log.spec.ts +++ b/e2e/log.spec.ts @@ -19,10 +19,9 @@ test.only('logs veggies', async ({page}) => { const toastLocator = page.getByTestId('toast-message'); - for (let i = 0; i < (await toastLocator.count()); i++) { - await toastLocator.nth(i).click(); + while ((await toastLocator.count()) > 0) { + await toastLocator.first().click(); // Click the first toast message } - await page.getByTestId('navbar-link-settings').click(); await page.getByTestId('navbar-link-log').click(); await expect(page.getByTestId('category-status-chart-center-label')).toHaveText(