From beec66c9de483715a1af9af523b780d29fa35751 Mon Sep 17 00:00:00 2001 From: Yos Riady Date: Mon, 3 Aug 2026 10:20:24 +0700 Subject: [PATCH] Re-enable the funnel and flow live tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both were `it.skip`ed on the grounds that /v0/funnel and /v0/flow only accepted camelCase dateFrom/dateTo, so a snake_case call would 400. That is no longer true — the pipes were unified API-side. Verified live against api.formo.so: funnel returns 23,127 users and flow returns 156 transitions for snake_case date_from/date_to. Leaving them skipped meant the CLI's snake_case behaviour was only covered by a unit test asserting what it sends, with nothing checking the API still accepts it. Co-Authored-By: Claude Opus 5 (1M context) --- test/commands/analytics.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/commands/analytics.test.ts b/test/commands/analytics.test.ts index 9bbedde..8484921 100644 --- a/test/commands/analytics.test.ts +++ b/test/commands/analytics.test.ts @@ -203,13 +203,10 @@ describe('commands/analytics', function () { expect(result).to.exist; }); - // SKIPPED until the API-side fix unifying /v0/funnel and /v0/flow to - // snake_case date_from/date_to is deployed. The CLI now sends snake_case - // (see buildAnalyticsParams); production still only accepts camelCase - // dateFrom/dateTo for these two pipes, so a live call returns HTTP 400. - // Re-enable (.skip -> it) once the API change ships. The deterministic - // snake_case unit test above keeps the CLI behavior locked meanwhile. - it.skip('returns data from the funnel pipe (snake_case dates + JSON steps)', async function () { + // /v0/funnel and /v0/flow accept snake_case date_from/date_to — the pipes + // that once required camelCase were unified API-side, verified live. These + // two guard that: a regression to camelCase-only would 400 here. + it('returns data from the funnel pipe (snake_case dates + JSON steps)', async function () { await requiresLiveApi(this); const result = (await runAnalytics('funnel', { dateFrom: '2026-03-01', @@ -220,7 +217,7 @@ describe('commands/analytics', function () { expect(result).to.have.property('data'); }); - it.skip('returns data from the flow pipe (snake_case dates + JSON start_step)', async function () { + it('returns data from the flow pipe (snake_case dates + JSON start_step)', async function () { await requiresLiveApi(this); const result = (await runAnalytics('flow', { dateFrom: '2026-03-01',