Email verification looks like one step in a React form: submit, wait, and show success. In an end-to-end test, it is really a small distributed workflow. The browser starts an action, a backend sends a message, an inbox receives it, and the UI eventually consumes a token.
When that workflow is represented by isLoading and hasError , the test has to guess what happened. Was the message not sent? Did polling start too early? Did the fixture expire? Or did the UI simply miss a state change?
I have found a cleaner approach: model the email flow as a state machine, then let the React component render that machine. This makes the product behavior clearer and gives TypeScript tests useful evidence instead of another vague timeout.
Why a boolean is too small for email verification
A boolean works for a request with two outcomes.…