From 060c5d00d1a91d3d0ba58f66febe0cc050e5d361 Mon Sep 17 00:00:00 2001 From: Stefan Hildebrandt <695494+hildebrandttk@users.noreply.github.com> Date: Wed, 8 Jul 2026 00:06:39 +0200 Subject: [PATCH] test(integration): draft handling and shared-folder moves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add draft and shared-folder-move coverage (suite now 31 tests). Findings are asserted server-side or pinned with test.fail where the UI is incomplete. Drafts (07): - multiple recipients (committed and typed-but-uncommitted) persist, and the draft reopens via the continue-draft button; - a server-created draft (with $draft) shows the continue-draft button; - a changed sender identity is saved to the draft on the server; - KNOWN BUG (test.fail): reopening a draft resets the From selector to the default identity instead of the one the draft was saved with. Shared-folder moves (08): - shared -> shared (same owner) moves work in both directions (server-verified); - KNOWN LIMITATION (test.fail): cross-account moves (own account <-> shared folder) don't relocate the message — the Move-to submenu offers the target but clicking it is a no-op. Hooks added: composer From select + save-status, viewer edit-draft button, context-menu "Move to" submenu + per-target testids (testId on ContextMenuSubMenu). Helpers: JMAP identities/createDraft/sharing, composer drive + move-via-submenu. README documents the findings. --- components/email/email-composer.tsx | 3 +- components/email/email-context-menu.tsx | 3 +- components/email/email-viewer.tsx | 1 + components/ui/context-menu.tsx | 4 + integration/README.md | 26 +++- integration/tests/07-drafts.spec.ts | 146 ++++++++++++++++++++++ integration/tests/08-shared-moves.spec.ts | 119 ++++++++++++++++++ integration/tests/helpers/app.ts | 71 +++++++++++ integration/tests/helpers/jmap.ts | 51 +++++++- 9 files changed, 420 insertions(+), 4 deletions(-) create mode 100644 integration/tests/07-drafts.spec.ts create mode 100644 integration/tests/08-shared-moves.spec.ts diff --git a/components/email/email-composer.tsx b/components/email/email-composer.tsx index bc6f873f..8393b303 100644 --- a/components/email/email-composer.tsx +++ b/components/email/email-composer.tsx @@ -2071,7 +2071,7 @@ export function EmailComposer({ -
+

{t('new_message')}

{saveStatus === 'saving' && (
@@ -2136,6 +2136,7 @@ export function EmailComposer({