Skip to content

Commit 7cf38c4

Browse files
committed
test(app-shell): let the matrix's typed doubles answer withPreviewDrafts with the client
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 20e78ee commit 7cf38c4

5 files changed

Lines changed: 10 additions & 5 deletions

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.autosave-11787.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function deferred() {
5050
}
5151

5252
/** The slice of the metadata client the editor calls here. */
53-
type FakeClient = Record<string, (...args: never[]) => Promise<unknown>>;
53+
// `withPreviewDrafts` answers the client itself, not a promise (objectstack#26840).
54+
type FakeClient = Record<string, (...args: never[]) => unknown>;
5455

5556
function makeClient(server: Server, opts: { holdFirstSave?: Promise<void> } = {}): FakeClient {
5657
return {

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.fieldRuleInherited-26597.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ interface SavedSet {
2525
fields?: Record<string, FieldEntry>;
2626
}
2727

28-
type FakeClient = Record<string, (...args: never[]) => Promise<unknown>>;
28+
// `withPreviewDrafts` answers the client itself, not a promise (objectstack#26840).
29+
type FakeClient = Record<string, (...args: never[]) => unknown>;
2930

3031
let clientImpl: FakeClient;
3132
let saved: SavedSet[] = [];

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.fieldWhen-25866.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ interface SavedSet {
2525
}
2626

2727
/** The slice of the metadata client the editor calls here. */
28-
type FakeClient = Record<string, (...args: never[]) => Promise<unknown>>;
28+
// `withPreviewDrafts` answers the client itself, not a promise (objectstack#26840).
29+
type FakeClient = Record<string, (...args: never[]) => unknown>;
2930

3031
let clientImpl: FakeClient;
3132
let saved: SavedSet[] = [];

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.firstSavePinned-11773.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ interface Server {
3535
savedOpts: Array<Record<string, unknown> | undefined>;
3636
}
3737

38-
type FakeClient = Record<string, (...args: never[]) => Promise<unknown>>;
38+
// `withPreviewDrafts` answers the client itself, not a promise (objectstack#26840).
39+
type FakeClient = Record<string, (...args: never[]) => unknown>;
3940

4041
function makeClient(server: Server): FakeClient {
4142
return {

‎ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.rlsAddPolicyHold-13113.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ interface Server {
6666
judge: (body: Record<string, unknown>) => Refusal | null;
6767
}
6868

69-
type FakeClient = Record<string, (...args: never[]) => Promise<unknown>>;
69+
// `withPreviewDrafts` answers the client itself, not a promise (objectstack#26840).
70+
type FakeClient = Record<string, (...args: never[]) => unknown>;
7071

7172
function makeClient(server: Server): FakeClient {
7273
return {

0 commit comments

Comments
 (0)