From 3525cc38b6ef7277a135d85f08702329929919d2 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Wed, 27 Nov 2024 22:12:28 -0600 Subject: [PATCH] expectToast and expectNoToast use toContainText instead of toHaveText --- test/e2e/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/utils.ts b/test/e2e/utils.ts index 38e32a5ab..5d477cb80 100644 --- a/test/e2e/utils.ts +++ b/test/e2e/utils.ts @@ -118,7 +118,7 @@ export async function stopInstance(page: Page) { * Assert that a toast with text matching `expectedText` is visible. */ export async function expectToast(page: Page, expectedText: string | RegExp) { - await expect(page.getByTestId('Toasts')).toHaveText(expectedText) + await expect(page.getByTestId('Toasts')).toContainText(expectedText) await closeToast(page) } @@ -126,7 +126,7 @@ export async function expectToast(page: Page, expectedText: string | RegExp) { * Assert that a toast with text matching `expectedText` is not visible. */ export async function expectNoToast(page: Page, expectedText: string | RegExp) { - await expect(page.getByTestId('Toasts')).not.toHaveText(expectedText) + await expect(page.getByTestId('Toasts')).not.toContainText(expectedText) } /**