Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(mobile): isolate native video in message render fixtures
Chris569fd698e86d
diff --git a/apps/mobile/src/__tests__/BotGroupMessageAttachments.test.tsx b/apps/mobile/src/__tests__/BotGroupMessageAttachments.test.tsxindex 1d671dcdcf..bc9491692a 100644--- a/apps/mobile/src/__tests__/BotGroupMessageAttachments.test.tsx+++ b/apps/mobile/src/__tests__/BotGroupMessageAttachments.test.tsx@@ -12,6 +12,7 @@ vi.mock('@/platform/gestureHandler', () => {});vi.mock('react-native-webview', () => ({ WebView: () => null }));vi.mock('expo-modules-core', () => ({ requireOptionalNativeModule: () => null }));+vi.mock('@/session/NativeVideoPlayer', () => ({ NativeVideoPlayer: () => null }));// Keep the real group attachment, AttachmentStrip, MediaPreview and LegendList hooks.// Only native surfaces and unrelated viewers are replaced for Node rendering.diff --git a/apps/mobile/src/__tests__/fileChipNameWidth.test.tsx b/apps/mobile/src/__tests__/fileChipNameWidth.test.tsxindex 1f7bf3dea5..6273d442ba 100644--- a/apps/mobile/src/__tests__/fileChipNameWidth.test.tsx+++ b/apps/mobile/src/__tests__/fileChipNameWidth.test.tsx@@ -13,6 +13,7 @@ vi.mock('@/platform/gestureHandler', () => {vi.mock('@/session/McpAppCard', () => ({ McpAppCard: () => null }));vi.mock('react-native-webview', () => ({ WebView: () => null }));vi.mock('expo-modules-core', () => ({ requireOptionalNativeModule: () => null }));+vi.mock('@/session/NativeVideoPlayer', () => ({ NativeVideoPlayer: () => null }));// Keeps the rendered React Native styles of the real file chip (#5875). Node has no Yoga, so the// content-sized width below applies Yoga's own flex-basis rule to those styles instead of a layout pass.diff --git a/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx b/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsxindex 02482d2a04..e9b0409e38 100644--- a/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx+++ b/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx@@ -11,6 +11,8 @@ vi.mock('@/platform/gestureHandler', () => {return { GestureDetector: ({ children }: { children: unknown }) => children, Gesture: { LongPress: chain } };});vi.mock('expo-modules-core', () => ({ requireOptionalNativeModule: () => null }));+// Native playback is covered by NativeVideoPlayer/inlineVideoPlayer; retain this suite's message assertions.+vi.mock('@/session/NativeVideoPlayer', () => ({ NativeVideoPlayer: () => null }));// Screen reader toggle and the system action menu availability, for the companion menu case.const a11y = vi.hoisted(() => ({ screenReader: null as null | ((enabled: boolean) => void), systemMenu: false }));diff --git a/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx b/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsxindex 5dce0236a4..b8ac4ffc9e 100644--- a/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx+++ b/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx@@ -12,6 +12,7 @@ vi.mock('@/platform/gestureHandler', () => {});vi.mock('react-native-webview', () => ({ WebView: () => null }));vi.mock('expo-modules-core', () => ({ requireOptionalNativeModule: () => null }));+vi.mock('@/session/NativeVideoPlayer', () => ({ NativeVideoPlayer: () => null }));// Keep the production list, bubble gate, invocation header, and message model.// Only native surfaces and unrelated heavy viewers are replaced for Node rendering.