ENH - enable unlocked browser phone preview

This commit is contained in:
smx.pusha
2026-08-14 07:26:34 +02:00
parent b59d46b252
commit 4b438fa1e2
3 changed files with 28 additions and 3 deletions
@@ -0,0 +1,21 @@
import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
const source = readFileSync(new URL('./App.vue', import.meta.url), 'utf8')
describe('browser development preview contract', () => {
it('starts unlocked while preserving an explicit lock screen preview', () => {
expect(source).toContain(
"developmentParameters.has('lockScreenPreview')",
)
expect(source).toContain(
'isLocked.value = !isDevelopment || developmentLockScreenPreview',
)
})
it('loads authenticated app data without replacing direct app routes', () => {
expect(source).toContain("if (isLocked.value) void router.replace('/')")
expect(source).toContain('else loadUnlockedPhoneData()')
})
})