BeginnerPW-MFA-00115 minutesPlaywright

Enroll a synthetic MFA identity

A signed-in synthetic identity can start a session-scoped MFA enrollment without contacting a real device or provider.

  • authentication
  • api
  • assertions

Objective

What to automate

Sign in, start MFA enrollment, verify the documented public OTP, and assert that the enrollment becomes enabled.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-AUTH-001.

Test data

  • account: standard_user
  • OTP: 480321
  • expected enrollment: enabled

Expected result

The MFA status reports an enabled synthetic-otp enrollment for the same isolated Practice Lab identity.

Progressive hints

Hint 1

Create the normal Practice Lab session before the MFA request.

Hint 2

Use the documented public OTP rather than a real authenticator application.

Hint 3

Assert the visible enrollment status after the verification response.

I’ve tried it — show solution
  1. Create the normal Practice Lab session before the MFA request.
  2. Use the documented public OTP rather than a real authenticator application.
  3. Assert the visible enrollment status after the verification response.

The deliberately failing starter is in tests/mfa.spec.ts inside the TypeScript starter ZIP.