Skip to content

RFC: e2e email testing #10535

@nicktrn

Description

@nicktrn

Is your proposal related to a problem?

emailissues

I believe a lot of this could be prevented by integrating emails into current e2e test flows.

There are many existing features that would greatly benefit from this, e.g. password reset, email verification, opt-in bookings, reminders, confirmations, etc. But also proposed features such as #8007.

Many different attempts to use emails in tests have already been made, this is merely the proposal of yet another way.

Current ideas

Problems

  • flaky tests
  • non-e2e
  • bypasses test isolation
  • untested key features
  • unmaintained software written in Go

Describe the solution you'd like

await bookFirstAvailable(page)
const email = await emails.waitForOne(hostEmailAddress)
await email.clickCta()
await expect(bookingConfirmedLocator).toBeVisible()

Key features:

  • test isolation -> fully parallel support
  • simple api that "just works"
  • minimal or NO changes to existing code

Describe alternatives you've considered

  • external APIs / cloud offerings
  • mailhog & co
  • existing packages

I believe all of these are incomplete, cumbersome so extend, or have other issues that make them unworkable.

Proposal

PR with working examples at #10560

Metadata

Metadata

Assignees

No one assigned

    Labels

    Low priorityCreated by Linear-GitHub Syncautomated-testsarea: unit tests, e2e tests, playwright✨ featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions