feat: publish HoloLake model-native living system source

This commit is contained in:
冰朔 2026-08-03 10:04:41 +08:00
commit c395dd3a99
2467 changed files with 615073 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import { fireEvent, render, screen } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { GuanghuThemeMenu } from './GuanghuThemeMenu'
describe('GuanghuThemeMenu', () => {
it('presents the current theme as a channel-style navigation control', () => {
render(<GuanghuThemeMenu value="lake-dark" onChange={vi.fn()} />)
expect(screen.getByRole('button', {
name: '选择光湖界面主题,当前为湖心深色(暗)',
})).toBeInTheDocument()
expect(screen.queryByRole('combobox')).not.toBeInTheDocument()
})
it('shows every theme in one consistent navigation menu and changes selection', async () => {
const onChange = vi.fn()
render(<GuanghuThemeMenu value="lake-dark" onChange={onChange} />)
fireEvent.pointerDown(
screen.getByRole('button', {
name: '选择光湖界面主题,当前为湖心深色(暗)',
}),
{ button: 0 },
)
fireEvent.click(await screen.findByRole('menuitemradio', { name: /极光深海/ }))
expect(onChange).toHaveBeenCalledWith('aurora-dark')
})
})