test(mcp): follow the mail tools and file tools that left their addon gates

Documents leaves the list of addons whose switch ends MCP sessions, since no tool waits for it any more.
This commit is contained in:
Maurice
2026-11-23 16:04:29 +01:00
parent 38381bc03a
commit f6d52727f7
4 changed files with 5 additions and 4 deletions
-1
View File
@@ -44,7 +44,6 @@ export const MCP_GATED_ADDON_IDS: readonly AddonId[] = [
ADDON_IDS.COLLAB,
ADDON_IDS.COLLECTIONS,
ADDON_IDS.DAWARICH,
ADDON_IDS.DOCUMENTS,
ADDON_IDS.JOURNEY,
ADDON_IDS.PACKING,
ADDON_IDS.ROADTRIP,
@@ -74,6 +74,8 @@ beforeEach(async () => {
await Promise.all(Object.values(ADDON_IDS).map((id) => setAddonEnabled(orm, id, true)));
// The wanderer tools show only while wanderer is allowed under Tours.
await setAppSetting(orm, 'tours_wanderer_enabled', 'true');
// The mail import tools show only while the import is on.
await setAppSetting(orm, 'mail_ingest_enabled', 'true');
});
afterEach(() => {
+2 -3
View File
@@ -750,9 +750,8 @@ describe('updateAddon', () => {
if (!flip.error) expect(flip.mcpAffected).toBe(false);
}
// and the one this change put on the list carries the opposite verdict
const docsFlip = (await updateAddon('documents', { enabled: false })) as any;
if (!docsFlip.error) expect(docsFlip.mcpAffected).toBe(true);
// documents left the list once its file tools stayed on without it
expect(((await updateAddon('documents', { enabled: false })) as any).mcpAffected).toBe(false);
});
it('ADMIN-SVC-087 — refuses to enable a photo provider while journey is off', async () => {
@@ -87,6 +87,7 @@ describe('ImmichPhotoProvider', () => {
expect(immich.streamImmichAsset).toHaveBeenCalledWith(res, 7, 'asset-1', 'original', 42, {
mediaType: 'image',
range: 'bytes=0-99',
publicView: false,
});
await immichProvider.fetchThumbnailBytes(ref);