feat: publish HoloLake model-native living system source
This commit is contained in:
parent
6ad10edde1
commit
c395dd3a99
2467 changed files with 615073 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
import { readFileSync } from 'node:fs'
|
||||
|
||||
interface TauriCapability {
|
||||
permissions: string[]
|
||||
windows: string[]
|
||||
}
|
||||
|
||||
const LINUX_WINDOW_CHROME_PERMISSIONS = [
|
||||
'core:window:allow-start-dragging',
|
||||
'core:window:allow-start-resize-dragging',
|
||||
'core:window:allow-minimize',
|
||||
'core:window:allow-toggle-maximize',
|
||||
'core:window:allow-close',
|
||||
] as const
|
||||
|
||||
describe('Tauri window-control permissions', () => {
|
||||
it('allows the APIs used by Linux custom window chrome', () => {
|
||||
const capability = JSON.parse(
|
||||
readFileSync(`${process.cwd()}/src-tauri/capabilities/default.json`, 'utf8'),
|
||||
) as TauriCapability
|
||||
|
||||
expect(capability.permissions).toEqual(
|
||||
expect.arrayContaining([...LINUX_WINDOW_CHROME_PERMISSIONS]),
|
||||
)
|
||||
})
|
||||
|
||||
it('allows the AI workspace pop-out window to use app APIs', () => {
|
||||
const capability = JSON.parse(
|
||||
readFileSync(`${process.cwd()}/src-tauri/capabilities/default.json`, 'utf8'),
|
||||
) as TauriCapability
|
||||
|
||||
expect(capability.windows).toEqual(expect.arrayContaining(['main', 'ai-workspace', 'note-*']))
|
||||
})
|
||||
})
|
||||
Loading…
Reference in a new issue