diff --git a/frontend/tests/e2e/user/settings/totp.spec.ts b/frontend/tests/e2e/user/settings/totp.spec.ts index 6c9dfb854..9a24c82fd 100644 --- a/frontend/tests/e2e/user/settings/totp.spec.ts +++ b/frontend/tests/e2e/user/settings/totp.spec.ts @@ -35,4 +35,14 @@ test.describe('TOTP', () => { await expect(page.locator('.global-notification')).toContainText('Success') await expect(page.getByRole('button', {name: 'Enroll'})).toBeVisible() }) + + test('rejects wrong passcode during enrollment', async ({authenticatedPage: page}) => { + await gotoUserSettings(page, 'totp') + await page.getByRole('button', {name: 'Enroll'}).click() + await page.locator('#totpConfirmPasscode').fill('000000') + await page.getByRole('button', {name: 'Confirm'}).click() + + await expect(page.locator('.global-notification .vue-notification.error')).toBeVisible() + await expect(page).not.toHaveURL(/\/login/) + }) })