From 526b13170dcc9378a03fc008143ec0b45e13d510 Mon Sep 17 00:00:00 2001 From: m4 Date: Thu, 17 Sep 2026 23:08:24 +0800 Subject: [PATCH] test(desktop): satisfy Translations typing and lint rules for office-open tests Co-Authored-By: Claude Opus 4.7 --- .../src/app/right-sidebar/files/tree-dblclick.test.tsx | 5 ++++- apps/desktop/src/i18n/types.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app/right-sidebar/files/tree-dblclick.test.tsx b/apps/desktop/src/app/right-sidebar/files/tree-dblclick.test.tsx index ec2d96e9ba..f345ac690c 100644 --- a/apps/desktop/src/app/right-sidebar/files/tree-dblclick.test.tsx +++ b/apps/desktop/src/app/right-sidebar/files/tree-dblclick.test.tsx @@ -2,6 +2,8 @@ import { cleanup, fireEvent, render } from '@testing-library/react' import type * as React from 'react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import type * as FileActions from '../file-actions' + const { openFileWithSystemApp } = vi.hoisted(() => ({ openFileWithSystemApp: vi.fn() })) vi.mock('@/lib/office-files', () => ({ @@ -9,7 +11,7 @@ vi.mock('@/lib/office-files', () => ({ openFileWithSystemApp })) vi.mock('../file-actions', async importOriginal => { - const actual = await importOriginal() + const actual = await importOriginal() return { ...actual, @@ -40,6 +42,7 @@ function renderRow(id: string, isDirectory = false) { onAttachFolder={vi.fn()} onPreviewFile={onPreviewFile} style={{}} + tree={{} as never} /> ) diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts index 6c29170eeb..bcd99f7323 100644 --- a/apps/desktop/src/i18n/types.ts +++ b/apps/desktop/src/i18n/types.ts @@ -3288,6 +3288,9 @@ export interface Translations { largeTitle: string largeBody: (label: string, size: string) => string previewAnyway: string + openWithSystemApp: string + systemOpenFailed: string + remoteTooLarge: string truncated: string noInlineTitle: string noInlineBody: (mimeType: string) => string