mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-03 17:00:53 +00:00
FIX - make phone input and overlays CEF safe
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
removeWidget,
|
||||
resizeWidget,
|
||||
widgetOccupiedCells,
|
||||
widgetKeyboardTarget,
|
||||
} from '@/utils/widgetLayout'
|
||||
|
||||
describe('widget layout', () => {
|
||||
@@ -47,6 +48,21 @@ describe('widget layout', () => {
|
||||
expect(next.instances).toHaveLength(layout.instances.length)
|
||||
})
|
||||
|
||||
it('provides bounded keyboard targets for each widget size', () => {
|
||||
const layout = createDefaultWidgetLayout()
|
||||
const clock = layout.instances.find(
|
||||
(instance) => instance.id === 'home-clock',
|
||||
)!
|
||||
const music = layout.instances.find(
|
||||
(instance) => instance.id === 'home-music',
|
||||
)!
|
||||
|
||||
expect(widgetKeyboardTarget(clock, 'right')).toEqual({ column: 1, row: 0 })
|
||||
expect(widgetKeyboardTarget(clock, 'up')).toBeNull()
|
||||
expect(widgetKeyboardTarget(music, 'right')).toBeNull()
|
||||
expect(widgetKeyboardTarget(music, 'down')).toEqual({ column: 0, row: 3 })
|
||||
})
|
||||
|
||||
it('allows a small widget in the center with app cells on both sides', () => {
|
||||
const layout = createDefaultWidgetLayout()
|
||||
const moved = moveWidget(layout, 'home-clock', 2, 1, 1)
|
||||
|
||||
Reference in New Issue
Block a user