From 2f7873e75690bbfb10cab5e443d2b52a9d271fb1 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sun, 18 Oct 2026 14:39:07 +0200 Subject: [PATCH] test: update the inline image reply test for the current composer mocks --- .../__tests__/composer-inline-image-cid.test.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/components/email/__tests__/composer-inline-image-cid.test.tsx b/components/email/__tests__/composer-inline-image-cid.test.tsx index 52d4b62ee..5896ea943 100644 --- a/components/email/__tests__/composer-inline-image-cid.test.tsx +++ b/components/email/__tests__/composer-inline-image-cid.test.tsx @@ -82,6 +82,8 @@ vi.mock('@/stores/settings-store', () => { attachmentReminderKeywords: [], emptySubjectWarningEnabled: true, sendDelaySeconds: 0, + externalContentPolicy: 'block', + isSenderTrusted: () => false, signaturePosition: 'above_quote', signatureSeparatorEnabled: false, requestReadReceiptDefault: false, @@ -123,6 +125,14 @@ vi.mock('@/stores/toast-store', () => ({ })); vi.mock('@/lib/plugin-hooks', () => ({ + identityHooks: { + onSignatureRender: { size: 0, transform: async (value: unknown) => value }, + onIdentitySelect: { size: 0, emit: async () => {} }, + }, + templateHooks: { + onTemplateRender: { size: 0, transform: async (value: unknown) => value }, + onTemplateApply: { size: 0, emit: async () => {} }, + }, emailHooks: { onComposerOpen: { call: async () => [] }, onRecipientChange: { call: async () => [] }, @@ -130,8 +140,8 @@ vi.mock('@/lib/plugin-hooks', () => ({ onRecipientChipsChange: { transform: async (chips: unknown) => chips }, onDraftChange: { emit: () => {} }, onBeforeDraftAutoSave: { transform: async (draft: unknown) => draft }, - onBeforeEmailSend: { intercept: async () => true }, - onComposeSend: { intercept: async () => true }, + onBeforeEmailSend: { intercept: async () => true, interceptOutcome: async () => 'allowed' }, + onComposeSend: { takeOver: async () => 'default' }, onTransformOutgoingEmail: { transform: async (email: unknown) => email }, }, contactHooks: { @@ -182,6 +192,7 @@ describe('reply/forward inline image cid normalization', () => { client: { fetchBlobArrayBuffer, hasDelayedSend: () => false, + supportsPrincipals: () => false, getMaxDelayedSend: () => 0, } as never, });