Objective
What to automate
Submit an incorrect OTP three times for one valid challenge.
Preconditions and test data
Preconditions
- Use a fresh isolated Practice Lab browser context.
- Open the fixture identified by FX-AUTH-001.
Test data
invalid OTP: 000000attempts: 3expected code: MFA_ATTEMPTS_EXHAUSTED
Expected result
The first failures report MFA_CODE_INVALID and the third reports MFA_ATTEMPTS_EXHAUSTED.
Progressive hints
Hint 1
Reuse one valid, unexpired challenge ID for all three submissions.
Hint 2
Assert the attemptsRemaining detail after the first failure.
Hint 3
Expect the final named exhaustion code instead of continuing retries.
I’ve tried it — show solution
- Reuse one valid, unexpired challenge ID for all three submissions.
- Assert the attemptsRemaining detail after the first failure.
- Expect the final named exhaustion code instead of continuing retries.
The deliberately failing starter is in tests/mfa.spec.ts inside the TypeScript starter ZIP.