From d8ba1202f665d2ab93f8d100e22fb265eb7a63c8 Mon Sep 17 00:00:00 2001 From: Lewis Blackburn Date: Mon, 9 Sep 2024 23:32:58 +0100 Subject: [PATCH] fix: Change how text is found in 2fa test --- tests/e2e/2fa.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/2fa.test.ts b/tests/e2e/2fa.test.ts index fec2e2d..7ea690b 100644 --- a/tests/e2e/2fa.test.ts +++ b/tests/e2e/2fa.test.ts @@ -28,9 +28,9 @@ test('Users can add 2FA to their account and use it when logging in', async ({ await expect(page).toHaveURL(`dashboard/settings/profile/two-factor`) - // eslint-disable-next-line no-warning-comments - // FIXME: For some reason this assertion fails - // await expect(main).toHaveText(/You have enabled two-factor authentication./i) + await expect( + page.getByText(/You have enabled two-factor authentication./i), + ).toBeVisible() await expect(main.getByRole('link', { name: /disable 2fa/i })).toBeVisible() await page.getByRole('link', { name: user.name ?? user.username }).click()