Skip to content

Commit fadc706

Browse files
committed
test(mobile): match selectable error rendering
1 parent e3ec36d commit fadc706

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/mobile/src/components/agents/tool-cards/tool-card-output-cap.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,10 @@ describe('tool-card output caps removed', () => {
254254
// eslint-disable-next-line new-cap, react-compiler-runtime/react-compiler-runtime -- direct function call
255255
const root = ReadToolCardBody({ part }) as unknown as React.ReactElement;
256256
expect(resolveMarkdownBody).toHaveBeenCalledWith(part);
257-
const texts = findByType(root, 'Text');
258-
expect(texts.some(el => (el.props as { children?: unknown }).children === 'boom')).toBe(true);
257+
// `SelectableText` renders a read-only `TextInput` whose text flows
258+
// through the `value` prop, not a `Text` element with children.
259+
const inputs = findByType(root, 'TextInput');
260+
expect(inputs.some(el => (el.props as { value?: unknown }).value === 'boom')).toBe(true);
259261
expect(findByType(root, 'ReadMarkdownBody')).toHaveLength(0);
260262
isMarkdownPath.mockReturnValue(false);
261263
});

0 commit comments

Comments
 (0)