diff --git a/tests/e2e/08-marketplace.spec.ts b/tests/e2e/08-marketplace.spec.ts index 9f38f911d..3080e418e 100644 --- a/tests/e2e/08-marketplace.spec.ts +++ b/tests/e2e/08-marketplace.spec.ts @@ -158,11 +158,8 @@ test.describe('MARKETPLACE — Cart (in-page)', () => { await addToCartBtn.click(); await page.waitForTimeout(1_000); - // react-hot-toast renders with [role="status"] + .go-* classes, not toast-alert testid - const toast = page.getByTestId('toast-alert').first() - .or(page.locator('[role="status"]').filter({ hasText: /added to cart|ajouté/i }).first()) - .or(page.locator('.go2072408551, [class*="react-hot-toast"]').first()) - .or(page.locator('div').filter({ hasText: /added to cart/i }).first()); + // react-hot-toast renders with role="status" aria-live="polite" + text "added to cart" + const toast = page.locator('[role="status"][aria-live]').filter({ hasText: /added to cart/i }).first(); await expect(toast).toBeVisible(); }); });