feat: Auto submit 2FA if all inputs have a value (#9729)

* auto submit 2FA if all inputs have a value

* organize imports

* Fix duplicate text issue, this label is part of TwoFactor

* Fixed test that was failing due to enable-2fa not clickable anymore due to auto-submit

* Remove extra newline for clarity

---------

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Afzal SayedandAlex van Andel authored and GitHub committed 2023-07-13 20:54:57 +00:00
1 parent 1419c534c8
commit 58d6bb840a
4 files changed
+41 -3

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@ test.describe("2FA Tests", async () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await fillOtp({ page, secret: secret! });
await page.click('[data-testid="enable-2fa"]');
await expect(page.locator(`[data-testid=two-factor-switch][data-state="checked"]`)).toBeVisible();
return user;