From 01f99aa54448ba09f870360b4fb0259e962af143 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Wed, 5 Aug 2026 16:19:50 +0800 Subject: [PATCH] test(time-context): align the real-API assertion with the snapshot form The e2e lane pinned the pre-form source shape, so it failed on CI while the unit lane passed; the reading is now a `snapshot`-form context carrying one named contribution. --- packages/context/time-context/tests/time-context.e2e.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/context/time-context/tests/time-context.e2e.ts b/packages/context/time-context/tests/time-context.e2e.ts index 02704d3eba..6cdc9e3068 100644 --- a/packages/context/time-context/tests/time-context.e2e.ts +++ b/packages/context/time-context/tests/time-context.e2e.ts @@ -56,7 +56,14 @@ describe('time-context through a real headless cordis.yml', () => { for (let index = 0; index < contexts.length; index += 1) { expect(contexts[index]!.seq).toBeLessThan(starts[index]!.seq) expect(contexts[index]!.surfaceOp).toBe('append') - expect(contexts[index]!.data.source).toEqual({ kind: 'plugin', plugin: 'time-context' }) + // `snapshot` form: one named contribution whose text is exactly what the + // model read, so a consumer attributes it without re-splitting prose. + expect(contexts[index]!.data.source).toMatchObject({ + kind: 'plugin', + plugin: 'time-context', + form: 'snapshot', + sections: [{ name: 'time-context' }], + }) } const contextText = contexts.map(event => event.data.content .filter(block => block.type === 'text')