@devries-cameron20 / composio Mirror · read-only / commits / 8d09be175
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 07:15 UTC

test(cli): align trigger fixtures with polling responses (#5190)

This PR: - aligns trigger-create test fixtures with the polling response contract in the published @composio/client 2.0.0 - supplies type, fallback_reason and polling_interval in the shared repository layer, native-client stub and command-local fixtures - updates the existing stdout assertion to include the complete response - passes the full TypeScript workspace typecheck, 70 trigger tests, focused lint, hosted CI and the quick native review - changes only two test files; the SDK retains its published client pin, and no changeset or CLI recording is needed The official client release-acceptance workflow passed against this exact commit, covering the TypeScript SDK workspace, examples, lint and core/CLI unit tests, the Python SDK and examples, and the Effect consumer: https://github.com/ComposioHQ/composio-client/actions/runs/41602649950 Client 2.0.0 release: https://github.com/ComposioHQ/composio-client/releases/tag/client-v2.0.0

Alberto Schiabel committed Nov 3, 2026 at 13:17 UTC 8d09be17545d06422d3049b1fd2c7066669528c3
2 files changed +28 -3
ts/packages/cli/test/__utils__/services/test-layer.ts
+6
@@ -386,6 +386,9 @@ export const TestLayer = (input?: TestLiveInput) =>
386 createTrigger: (triggerSlug: string, params?: TriggerInstanceUpsertParams) =>
387 Effect.succeed({
388 trigger_id: `trg_${triggerSlug.toLowerCase()}_${params?.connected_account_id ?? 'new'}`,
389 + type: 'webhook' as const,
390 + fallback_reason: null,
391 + polling_interval: null,
392 }),
393 enableTrigger: () => Effect.succeed({ status: 'success' as const }),
394 disableTrigger: () => Effect.succeed({ status: 'success' as const }),
@@ -648,6 +651,9 @@ export const TestLayer = (input?: TestLiveInput) =>
651 }
652 return Effect.succeed({
653 trigger_id: `trg_${triggerSlug.toLowerCase()}_${params?.connected_account_id ?? 'new'}`,
654 + type: 'webhook' as const,
655 + fallback_reason: null,
656 + polling_interval: null,
657 });
658 },
659 manage: {
ts/packages/cli/test/src/commands/triggers/create/triggers.create.cmd.test.ts
+22 -3
@@ -98,7 +98,12 @@ describe('CLI: composio dev triggers create', () => {
98 createTrigger: (slug, params) =>
99 Effect.sync(() => {
100 calls.push({ slug, params });
101 - return { trigger_id: 'trg_new' };
101 + return {
102 + trigger_id: 'trg_new',
103 + type: 'webhook' as const,
104 + fallback_reason: null,
105 + polling_interval: null,
106 + };
107 }),
108 })
109 );
@@ -149,7 +154,16 @@ describe('CLI: composio dev triggers create', () => {
154 expect(output).toContain('Trigger created');
155 expect(output).toContain('trg_gmail_new_gmail_message_con_123');
156 expect(lines.at(-1)).toBe(
152 - JSON.stringify({ trigger_id: 'trg_gmail_new_gmail_message_con_123' }, null, 2)
157 + JSON.stringify(
158 + {
159 + trigger_id: 'trg_gmail_new_gmail_message_con_123',
160 + type: 'webhook',
161 + fallback_reason: null,
162 + polling_interval: null,
163 + },
164 + null,
165 + 2
166 + )
167 );
168 })
169 );
@@ -168,7 +182,12 @@ describe('CLI: composio dev triggers create', () => {
182 createTrigger: (slug, params) =>
183 Effect.sync(() => {
184 calls.push({ slug, params });
171 - return { trigger_id: 'trg_new' };
185 + return {
186 + trigger_id: 'trg_new',
187 + type: 'webhook' as const,
188 + fallback_reason: null,
189 + polling_interval: null,
190 + };
191 }),
192 })
193 );