Preconditions
Fixture event has event, guest, access-type, tenant, and brand token samples plus a recipient missing firstName.
Happy path
Open token picker.
Token catalog is categorized and searchable.
Insert a token.
The editor treats tokens as atomic chips.
Preview per recipient.
Resolved values and fallbacks are visible before send.
Failure modes
Send blocked on validation failure
Trigger: unknown token is inserted.
Resolution: 400 invalid token and no partial-send.
Bounced recipient tracked and suppressed
Trigger: tokenized email bounces.
Resolution: bounce event persists and future sends are suppressed.
Scheduled-message edit window
Trigger: tokenized scheduled email is edited past cutoff.
Resolution: 409 PAST_EDIT_WINDOW.
Retry on transient failure
Trigger: provider 5xx.
Resolution: same Idempotency-Key retry, one delivery.
Idempotency-key on test-send
Trigger: double-click tokenized test-send.
Resolution: one test email is produced.
Recipient resolution empty
Trigger: selected recipient sample or audience resolves to zero.
Resolution: 409 NO_RECIPIENTS.
Token rendering fallback
Trigger: {guest.firstName} is undefined.
Resolution: fallback or non-empty placeholder renders.
Cancel scheduled before send
Trigger: queued tokenized send is cancelled.
Resolution: queue drains and cancellation is audited.
Per-recipient isolation
Trigger: batch render contains multiple guests.
Resolution: no recipient sees another recipient's token values.
Catalog category drift
Trigger: backend returns token without category.
Resolution: token is grouped under Unknown with warning, not hidden.
Deployed-runtime gap
Trigger: deployed run on 2026-04-29 observed token catalog 404; the probe locks this in until the gap is closed.
Resolution: the story expects the 404 until deployed token catalog is reachable.
Stable test attributes
Visibility teeth. Each attribute must be effectively visible when active.
email-tokens-page | Page | Dynamic elements |
email-token-picker | Editor | Token picker |
email-token-category-list | Picker | Categories |
email-token-editor | Editor | Token insertion |
email-token-recipient-picker | Preview | Recipient sample |
email-token-preview | Preview | Resolved output |
email-token-test-send-cta | Toolbar | Test send |
email-token-warning | Page | Validation |
email-token-gap-panel | Page | Runtime gap |
Agent test plan
- email-tokens-renders
- insert-email-token
- preview-recipient-tokens
- deployed-runtime-gap