Expand AITURK Turkish settings and desktop surfaces for beta 5
This commit is contained in:
1 parent
237d1e2060
commit
5e76f58637
108 files changed
+6675
-1034
No files matched your search
@@ -0,0 +1,63 @@
|
||||
import { cleanup, render, screen } from '@testing-library/react'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { I18nProvider } from '@/i18n/context'
|
||||
|
||||
import { ComputerUsePanel } from './computer-use-panel'
|
||||
|
||||
const getStatus = vi.hoisted(() => vi.fn())
|
||||
vi.mock('@/hermes', () => ({
|
||||
getComputerUseStatus: getStatus,
|
||||
getActionStatus: vi.fn(),
|
||||
grantComputerUsePermissions: vi.fn()
|
||||
}))
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
describe('Computer Use localized permissions', () => {
|
||||
it('renders macOS permission labels, explanations, and states in Turkish', async () => {
|
||||
getStatus.mockResolvedValue({
|
||||
platform: 'darwin',
|
||||
platform_supported: true,
|
||||
installed: true,
|
||||
can_grant: true,
|
||||
accessibility: true,
|
||||
screen_recording: false,
|
||||
ready: false,
|
||||
checks: []
|
||||
})
|
||||
render(
|
||||
<I18nProvider configClient={null} initialLocale="tr">
|
||||
<ComputerUsePanel />
|
||||
</I18nProvider>
|
||||
)
|
||||
expect(await screen.findByText('Erişilebilirlik')).toBeTruthy()
|
||||
expect(screen.getByText('Ekran Kaydı')).toBeTruthy()
|
||||
expect(screen.getByText('İzin verildi')).toBeTruthy()
|
||||
expect(screen.getByText('İzin verilmedi')).toBeTruthy()
|
||||
expect(screen.getByText(/uygulama pencerelerinin ekran görüntüsünü/)).toBeTruthy()
|
||||
expect(screen.getByRole('button', { name: 'İzinleri ver' })).toBeTruthy()
|
||||
})
|
||||
|
||||
it('retains English and represents a ready Windows driver without macOS permission controls', async () => {
|
||||
getStatus.mockResolvedValue({
|
||||
platform: 'win32',
|
||||
platform_supported: true,
|
||||
installed: true,
|
||||
can_grant: false,
|
||||
ready: true,
|
||||
checks: []
|
||||
})
|
||||
render(
|
||||
<I18nProvider configClient={null} initialLocale="en">
|
||||
<ComputerUsePanel />
|
||||
</I18nProvider>
|
||||
)
|
||||
expect(await screen.findByText('Driver health')).toBeTruthy()
|
||||
expect(screen.getByText('Ready')).toBeTruthy()
|
||||
expect(screen.queryByRole('button', { name: 'Grant permissions' })).toBeNull()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user