test(ext): refine org_list_items fixture to OrgManifestEntry shape
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3b8DA2mXmLWkd4zDbHXHg
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user