mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-01 10:48:55 +00:00
FIX - modernize lock screen passcode flow
Rebuild device unlock around the current iOS-style wallpaper, outlined keypad, telephone letters, status bar, and keyboard support. Require the passcode only for the first unlock of each open device session so a soft lock from the status bar returns directly after the session is authenticated.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const source = readFileSync(
|
||||
new URL('./PhonePasscode.vue', import.meta.url),
|
||||
'utf8',
|
||||
)
|
||||
|
||||
describe('PhonePasscode iOS presentation contract', () => {
|
||||
it('uses the Lock Screen wallpaper and status bar for device unlocks', () => {
|
||||
expect(source).toContain('lockScreen?: boolean')
|
||||
expect(source).toContain('settings.lockWallpaperImageUrl')
|
||||
expect(source).toContain(
|
||||
'wallpaper--${phone.preferences.settings.lockWallpaper}',
|
||||
)
|
||||
expect(source).toContain('<PhoneStatusBar v-if="lockScreen"')
|
||||
})
|
||||
|
||||
it('renders the telephone letters and accessible native-size controls', () => {
|
||||
expect(source).toContain("{ digit: 2, letters: 'ABC' }")
|
||||
expect(source).toContain("{ digit: 7, letters: 'PQRS' }")
|
||||
expect(source).toContain('min-height: var(--sky-touch-target)')
|
||||
expect(source).toContain('passcode-screen__footer')
|
||||
expect(source).toContain('--passcode-key-background: transparent')
|
||||
expect(source).toContain('@keydown="handleKeydown"')
|
||||
})
|
||||
|
||||
it('keeps light, dark and reduced-motion treatments explicit', () => {
|
||||
expect(source).toContain(':global(.phone-app--light)')
|
||||
expect(source).toContain('@media (prefers-reduced-motion: reduce)')
|
||||
expect(source).toContain('passcode-screen__backdrop')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user