test(desktop): satisfy Translations typing and lint rules for office-open tests
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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<typeof import('../file-actions')>()
|
||||
const actual = await importOriginal<typeof FileActions>()
|
||||
|
||||
return {
|
||||
...actual,
|
||||
@@ -40,6 +42,7 @@ function renderRow(id: string, isDirectory = false) {
|
||||
onAttachFolder={vi.fn()}
|
||||
onPreviewFile={onPreviewFile}
|
||||
style={{}}
|
||||
tree={{} as never}
|
||||
/>
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user