Skip to content

Commit 06b408a

Browse files
committed
test(app-shell): give #27010's and #26837's matrix doubles the draft-overlaid read
Both new package-door tests landed beside #26840, whose load now reads the package's objects through MetadataClient.withPreviewDrafts; their fake clients lacked it, which turned main red on Test UI. Co-Authored-By: Claude <noreply@anthropic.com> (cherry picked from commit 039a875)
1 parent 80a1dae commit 06b408a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function makeClient(server: FakeServer) {
4343
return {
4444
layered: async () => ({ effective: server.set, code: null, overlay: null, overlayScope: null }),
4545
getDraft: async () => null,
46+
// objectstack#26840 — the package door reads its objects through the draft-overlaid door.
47+
withPreviewDrafts() { return this; },
4648
list: async (type: string) =>
4749
type === 'object' ? server.catalog : type === 'permission' ? [{ name: 'project_editor' }] : [],
4850
get: async (type: string) => (type === 'object' ? { fields: [{ name: 'notes' }] } : null),

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorDraftBase-26837.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ function makeClient(server: Server, opts: { draft: Record<string, unknown> | nul
9999
if (opts.rejectSaveTimeDraft && server.getDraftCalls > 1) throw new Error('draft read failed');
100100
return opts.draft ? { type: 'permission', name: 'sales_perms', item: opts.draft, version: 'v1' } : null;
101101
},
102+
// objectstack#26840 — the package door reads its objects through the draft-overlaid door.
103+
withPreviewDrafts() { return this; },
102104
// The package declares `a_account` only.
103105
list: async (type: string) => (type === 'object' ? [{ item: { name: 'a_account' } }] : []),
104106
get: async () => null,

0 commit comments

Comments
 (0)