Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(mobile): 撤掉只检查 flexGrow 字面量的断言
kirozeng1f60203475cf
diff --git a/apps/mobile/src/__tests__/composerToolbarViewport.test.tsx b/apps/mobile/src/__tests__/composerToolbarViewport.test.tsxindex 7ac0f4fe37..67319345da 100644--- a/apps/mobile/src/__tests__/composerToolbarViewport.test.tsx+++ b/apps/mobile/src/__tests__/composerToolbarViewport.test.tsx@@ -16,9 +16,8 @@ vi.mock('react-native', async () => {React.createElement('div', { 'data-testid': testID, style: flatten(style), ref: (node: HTMLDivElement | null) => {if (node && onLayout) nativeLayout.set(node, height => onLayout({ nativeEvent: { layout: { height } } }));} }, children);- const ScrollView = ({ children, testID, scrollEnabled, style, contentContainerStyle }: { children?: ReactNode; testID?: string; scrollEnabled?: boolean; style?: unknown; contentContainerStyle?: unknown }) =>- React.createElement('div', { 'data-testid': testID, 'data-scroll': String(scrollEnabled),- 'data-grow': `${flatten(style).flexGrow}/${flatten(contentContainerStyle).flexGrow}` }, children);+ const ScrollView = ({ children, testID, scrollEnabled }: { children?: ReactNode; testID?: string; scrollEnabled?: boolean }) =>+ React.createElement('div', { 'data-testid': testID, 'data-scroll': String(scrollEnabled) }, children);return { View, ScrollView, Pressable: View, Platform: { OS: 'ios' },StyleSheet: { hairlineWidth: 1, absoluteFill: {} }, Animated: {}, Easing: {} };});@@ -69,13 +68,9 @@ it('keeps send/voice/grabber outside the scrolling body and retains the editor arender(false);expect(container.querySelector('textarea')).toBe(editor);expect(body.getAttribute('data-scroll')).toBe('false');- // Collapsed: viewport and content fill the taller pill so the row stays vertically centred.- expect(body.getAttribute('data-grow')).toBe('1/1');render(true);expect(container.querySelector('textarea')).toBe(editor);expect(body.getAttribute('data-scroll')).toBe('true');- // Expanded: size to children so removed attachments release their height (#6291).- expect(body.getAttribute('data-grow')).toBe('0/0');} finally { act(() => root.unmount()); }});