E2E: exercise Mail threads, attachments and sender categories as a User #889

Open
opened 2026-10-02 17:34:23 +00:00 by kayg · 1 comment
Owner

Evidence

The current Mail browser flow connects a test account, waits for sync, checks one subject in the folder list, reloads and checks sync state (apps/web/e2e/mail-sync-613.mjs:185-208). It does not open a message or use the attachment or sender-category actions. The E2E source has no Mail thread or attachment API calls.

The reader shows thread navigation and sender-category choices (apps/web/src/lib/mail/MailView.svelte:163-175). It loads thread attachments and saves one to Files (apps/web/src/lib/mail/MailView.svelte:283-310). The category action writes the choice to the provider and updates the reader (apps/web/src/lib/mail/MailView.svelte:415-421).

Issue #726 covers HTML rendering and remote-content privacy. Issue #771 covers unread-count updates. This issue covers the remaining reader flows below.

Rule

Issue #865 requires E2E tests that use real User inputs and check what the User sees. The UX completeness rule requires the main action to work where it appears and edits to appear in every place that shows the same item.

Expected behaviour

A User can open a real message and its thread, find the thread's attachments, save an attachment to Files, and change the sender category. The saved File appears in Files without a reload. The selected category appears in the reader or category view after the write and after a reload.

Test idea

Extend the test Mail provider with a multi-message thread, a real attachment fixture and a sender with a category that can change. Use the production UI to open the message and thread, save the attachment, and change the category. Check the visible content and saved state, including Files. Do not use API calls to perform the actions under test. Cover pointer, keyboard and touch at 390, 820 and 1440 px in light and dark. Set the browser platform to macOS for screenshots.

## Evidence The current Mail browser flow connects a test account, waits for sync, checks one subject in the folder list, reloads and checks sync state (`apps/web/e2e/mail-sync-613.mjs:185-208`). It does not open a message or use the attachment or sender-category actions. The E2E source has no Mail thread or attachment API calls. The reader shows thread navigation and sender-category choices (`apps/web/src/lib/mail/MailView.svelte:163-175`). It loads thread attachments and saves one to Files (`apps/web/src/lib/mail/MailView.svelte:283-310`). The category action writes the choice to the provider and updates the reader (`apps/web/src/lib/mail/MailView.svelte:415-421`). Issue #726 covers HTML rendering and remote-content privacy. Issue #771 covers unread-count updates. This issue covers the remaining reader flows below. ## Rule Issue #865 requires E2E tests that use real User inputs and check what the User sees. The UX completeness rule requires the main action to work where it appears and edits to appear in every place that shows the same item. ## Expected behaviour A User can open a real message and its thread, find the thread's attachments, save an attachment to Files, and change the sender category. The saved File appears in Files without a reload. The selected category appears in the reader or category view after the write and after a reload. ## Test idea Extend the test Mail provider with a multi-message thread, a real attachment fixture and a sender with a category that can change. Use the production UI to open the message and thread, save the attachment, and change the category. Check the visible content and saved state, including Files. Do not use API calls to perform the actions under test. Cover pointer, keyboard and touch at 390, 820 and 1440 px in light and dark. Set the browser platform to macOS for screenshots.
Author
Owner

Audit finding for #889: mail-sync-613.mjs previously stopped after account setup, backfill and folder listing. Its TLS Dovecot mailbox had no linked RFC Message-ID pair or attachment, so a User could not exercise Mail threads, attachments or sender categories in E2E.

Added a two-message reply thread and MIME attachment to the existing fixture. The Mail E2E now opens and expands the thread, saves the attachment through the keyboard and checks it in Files, changes the sender category through the Mail menu and checks the Newsletters view, and opens the thread and attachment list by touch. Mail screenshot contexts emulate macOS and capture Settings, inbox, thread and category routes at 390/820/1440 px in light and dark.

Static checks passed: node --check apps/web/e2e/mail-sync-613.mjs, python3 AST parse of tests/adversarial/mail_sync_provider.py, and git diff --check (each exited 0 with no output). The local server run is deferred because the shared host was busy (load average was about 75/63/46 at the last check). Merge-round command: bun run build && bun e2e/mail-sync-613.mjs.

Audit finding for #889: `mail-sync-613.mjs` previously stopped after account setup, backfill and folder listing. Its TLS Dovecot mailbox had no linked RFC Message-ID pair or attachment, so a User could not exercise Mail threads, attachments or sender categories in E2E. Added a two-message reply thread and MIME attachment to the existing fixture. The Mail E2E now opens and expands the thread, saves the attachment through the keyboard and checks it in Files, changes the sender category through the Mail menu and checks the Newsletters view, and opens the thread and attachment list by touch. Mail screenshot contexts emulate macOS and capture Settings, inbox, thread and category routes at 390/820/1440 px in light and dark. Static checks passed: `node --check apps/web/e2e/mail-sync-613.mjs`, `python3` AST parse of `tests/adversarial/mail_sync_provider.py`, and `git diff --check` (each exited 0 with no output). The local server run is deferred because the shared host was busy (load average was about 75/63/46 at the last check). Merge-round command: `bun run build && bun e2e/mail-sync-613.mjs`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#889
No description provided.