mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 21:33:19 +00:00
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:
@@ -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(() => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user