Skip to content

Commit cbe9643

Browse files
committed
test(console): sibling pins learn the submitText resolver and forward key
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzPbVCsG2npDkDqikd
1 parent 9c6bb85 commit cbe9643

5 files changed

Lines changed: 10 additions & 2 deletions

‎ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.flowRowGuard-13397.test.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ vi.mock('@object-ui/i18n', async (importOriginal) => {
5454
actionParamText: (_o: unknown, _a: unknown, _p: unknown, _attr: unknown, fallback: string) => fallback,
5555
actionParamOptionLabel: (_o: unknown, _a: unknown, _p: unknown, _v: unknown, fallback: string) => fallback,
5656
actionDescription: (_o: unknown, _a: unknown, fallback: string) => fallback,
57+
actionSubmitText: (_o: unknown, _a: unknown, fallback: string) => fallback,
5758
}),
5859
useObjectTranslation: () => ({ t: zhT, language: 'zh' }),
5960
};

‎ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.oneToastPerRefusal-13340.test.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ vi.mock('@object-ui/i18n', async (importOriginal) => ({
5757
actionParamText: (_o: any, _a: any, _p: any, _attr: any, fallback: any) => fallback,
5858
actionParamOptionLabel: (_o: any, _a: any, _p: any, _v: any, fallback: any) => fallback,
5959
actionDescription: (_o: any, _a: any, fallback: any) => fallback,
60+
actionSubmitText: (_o: any, _a: any, fallback: any) => fallback,
6061
}),
6162
useObjectTranslation: () => ({
6263
t: (key: string, options?: any) => String(options?.defaultValue ?? key),

‎ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.paramDialogTitle.test.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ vi.mock('@object-ui/i18n', async (importOriginal) => ({
5858
actionParamText: (_o: any, _a: any, _p: any, _attr: any, fallback: any) => fallback,
5959
actionParamOptionLabel: (_o: any, _a: any, _p: any, _v: any, fallback: any) => fallback,
6060
actionDescription: (_o: any, _a: any, fallback: any) => fallback,
61+
actionSubmitText: (_o: any, _a: any, fallback: any) => fallback,
6162
}),
6263
useObjectTranslation: () => ({
6364
t: (key: string, options?: any) => String(options?.defaultValue ?? key),

‎ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.paramRefusal-13161.test.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ vi.mock('@object-ui/i18n', async (importOriginal) => ({
3838
actionParamText: (_o: any, _a: any, _p: any, _attr: any, fallback: any) => fallback,
3939
actionParamOptionLabel: (_o: any, _a: any, _p: any, _v: any, fallback: any) => fallback,
4040
actionDescription: (_o: any, _a: any, fallback: any) => fallback,
41+
actionSubmitText: (_o: any, _a: any, fallback: any) => fallback,
4142
}),
4243
useObjectTranslation: () => ({
4344
t: (key: string, options?: any) => String(options?.defaultValue ?? key),

‎ui/packages/components/src/renderers/action/__tests__/action-forward-precedence.test.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ const CONTEXT = { target: 'contextWins', extraFromHost: 'present' };
116116
*
117117
* `variant` (objectstack#26665) is the next, beside `confirmText`: the runner
118118
* reads it to paint that question's confirm button. Same reading.
119+
*
120+
* `submitText` (objectstack#28158) is the next, beside `description`: the
121+
* param dialog reads both, the line under its title and its submit button.
122+
* Same reading.
119123
*/
120124
const BUTTON_ORDER = [
121-
'type', 'name', 'label', 'description', 'target', 'openIn', 'endpoint', 'method',
125+
'type', 'name', 'label', 'description', 'submitText', 'target', 'openIn', 'endpoint', 'method',
122126
'params',
123127
'bodyExtra', 'bodyShape', 'operation', 'confirmText', 'variant', 'successMessage', 'outcomeMessages', 'errorMessage',
124128
'refreshAfter', 'undoable', 'recordIdField', 'locations', 'toast', 'resultDialog', 'onSuccess', 'objectName',
@@ -130,7 +134,7 @@ const BUTTON_ORDER = [
130134
* `params` key used to, so the order is unchanged.
131135
*/
132136
const ICON_ORDER = [
133-
'type', 'name', 'label', 'description', 'target', 'openIn', 'endpoint', 'method',
137+
'type', 'name', 'label', 'description', 'submitText', 'target', 'openIn', 'endpoint', 'method',
134138
'params',
135139
'bodyExtra', 'bodyShape', 'operation', 'confirmText', 'variant', 'successMessage', 'outcomeMessages', 'errorMessage',
136140
'refreshAfter', 'locations', 'toast', 'resultDialog', 'onSuccess', 'objectName',

0 commit comments

Comments
 (0)