Skip to content

Commit 8e28b0f

Browse files
committed
test(ui): type the gateFormFields pin's field list
Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj Co-authored-by: Claude <noreply@anthropic.com>
1 parent 501b08a commit 8e28b0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎ui/packages/plugin-form/src/stateMachineOptions.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe('narrowStateMachineOptions', () => {
134134

135135
describe('gateFormFields narrows a state-machine select (#25933)', () => {
136136
const gate = (mode: string, previousValues?: Record<string, unknown>) =>
137-
gateFormFields([statusField(), titleField()], {
137+
gateFormFields<Record<string, any>>([statusField(), titleField()], {
138138
perms: null,
139139
objectName: 'showcase_task',
140140
mode,
@@ -145,7 +145,7 @@ describe('gateFormFields narrows a state-machine select (#25933)', () => {
145145
it('narrows on an edit form handed its persisted record', () => {
146146
const [status, title] = gate('edit', { status: 'done' });
147147
expect(values(status.options)).toEqual(['in_progress', 'done']);
148-
expect(values((status as any).field.options)).toEqual(['in_progress', 'done']);
148+
expect(values(status.field.options)).toEqual(['in_progress', 'done']);
149149
expect(title).toEqual(titleField());
150150
});
151151

0 commit comments

Comments
 (0)