From 20357d698ef7d2d1a9d53006aae05e531a23e07b Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Thu, 25 Jun 2026 21:28:57 -0400 Subject: [PATCH] test(ext): refine org_list_items fixture to OrgManifestEntry shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PM contract refinement: org_list_items returns a DEDICATED OrgManifestEntry[] (collection REQUIRED), not the personal ManifestEntry-with-optional-collection. Dev-A is mirroring OrgManifest/OrgManifestEntry into shared/types.ts — the list imports that type at integration (no hand-rolling). Behaviors unaffected; scaffold stays RED (6 fail / 3 pass). Fixture-only change, no src. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01W3b8DA2mXmLWkd4zDbHXHg --- extension/src/popup/components/__tests__/item-list.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/src/popup/components/__tests__/item-list.test.ts b/extension/src/popup/components/__tests__/item-list.test.ts index cd8fcd7..58cbb74 100644 --- a/extension/src/popup/components/__tests__/item-list.test.ts +++ b/extension/src/popup/components/__tests__/item-list.test.ts @@ -30,7 +30,12 @@ describe('popup/item-list in org context', () => { // (the personal entries don't carry over across an org_switch). it('loads org items (grant-filtered) when context is an org', async () => { mockGetState.mockReturnValue({ orgContext: 'org-1', entries: [], searchQuery: '', selectedIndex: 0 }); - send.mockResolvedValue({ ok: true, data: [{ id: 'a', title: 'db', collection: 'prod-infra', modified: 1 }] }); + // org_list_items returns OrgManifestEntry[] (dedicated org type; collection is + // REQUIRED, not the personal ManifestEntry's optional one) — Dev-A mirrors + // OrgManifestEntry into shared/types.ts; the list consumes it at integration. + send.mockResolvedValue({ ok: true, data: [ + { id: 'a', type: 'login', title: 'db', tags: [], collection: 'prod-infra', modified: 1 }, + ]}); renderItemList(document.getElementById('app')!); await Promise.resolve();