Skip to content

5.1.9 E2E-AUTH-006 Eyebrow Email Gateway: Registered User #398

Description

@flyblackbox

5.1.9 E2E-AUTH-006 Eyebrow Email Gateway: Registered User

Summary

Add Playwright end-to-end coverage for the eyebrow email gateway when a logged-out visitor enters an email address that belongs to an existing registered user.

This test should confirm that the gateway recognizes the registered account state and presents appropriate login options, including magic link login and password login.

This is a P1 test because the eyebrow email gateway is an important shared entry point for authentication, invite requests, and onboarding.

User Story

As a registered user, I want the top email CTA to recognize my account and offer login options.

Test Metadata

Field Value
Test ID E2E-AUTH-006
Feature Area Authentication
Scenario Eyebrow Email Gateway: Registered User
Priority P1
Actor Registered User
Auth State Logged out
Required Data Registered user email
Viewports Desktop, Mobile
Suggested Spec File auth.spec.ts
Source Recent Feature Requirement

Test Steps

  1. Open Quote.Vote while logged out.
  2. Locate the eyebrow email gateway field.
  3. Enter an email address for an existing registered user.
  4. Submit the email.
  5. Confirm that the registered-user state appears.
  6. Confirm that magic link login is offered.
  7. Confirm that password login is offered.
  8. Repeat the test in desktop and mobile Playwright projects.

Expected Result

The eyebrow email gateway recognizes the registered user state and offers login options.

The application should:

  • Accept the registered email address
  • Identify that the email belongs to an existing account
  • Show a clear registered-user message
  • Offer magic link login
  • Offer password login
  • Keep the user logged out until authentication is completed
  • Avoid runtime errors or generic error toasts

Required Assertions

  • Eyebrow email field is visible to logged-out visitors
  • Email input accepts a registered email address
  • Submit button becomes available when the email is valid
  • Registered-user state appears after submission
  • Magic link login option is visible
  • Password login option is visible
  • User remains logged out before completing authentication
  • Flow works on desktop
  • Flow works on mobile
  • No runtime error or generic error toast appears

Suggested Selectors

Use stable data-testid selectors where possible:

  • [data-testid="eyebrow-email-form"]
  • [data-testid="eyebrow-email-input"]
  • [data-testid="eyebrow-email-submit"]
  • [data-testid="registered-user-message"]
  • [data-testid="magic-link-login-option"]
  • [data-testid="password-login-option"]

If these selectors do not exist yet, add them as part of the test implementation.

Technical Notes

Use a seeded registered test account.

Suggested account fixture:

  • registeredUser

Validate state-specific messaging carefully.

This flow may reveal whether an email is associated with an existing account. If the product intentionally supports state-specific gateway behavior, keep the messaging clear but avoid exposing unnecessary account details.

Out of Scope

This issue does not need to test:

  • Completing magic link login
  • Completing password login
  • Invite request flow for new emails
  • Pending invite state
  • Approved invite onboarding
  • Password reset
  • Email delivery

Those workflows should be covered by separate authentication or onboarding test issues.

Acceptance Criteria

  • Playwright test exists for the registered-user eyebrow email gateway state
  • Test runs while logged out
  • Test submits a registered user email
  • Test verifies registered-user messaging appears
  • Test verifies magic link login option appears
  • Test verifies password login option appears
  • Test verifies the user remains logged out until authentication is completed
  • Test runs on desktop and mobile Playwright projects
  • Test passes locally and in CI

Test Instructions

Run all Playwright tests:

npx playwright test

Run only auth tests:

npx playwright test auth.spec.ts

Run in headed mode for debugging:

npx playwright test auth.spec.ts --headed

Labels

testing e2e playwright authentication eyebrow-gateway frontend p1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions