mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 01:08:59 +00:00
56ca2c5ba9
Add the Health app with server-authoritative health, wellness, medical ID, and emergency-contact data flows. Register the app in the phone UI, add localized configuration and NUI coverage, persist its schema through the resource migration and install SQL, and include design references and the WebP app icon.
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { readFileSync } from 'node:fs'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const source = readFileSync(new URL('./HealthApp.vue', import.meta.url), 'utf8')
|
|
|
|
describe('HealthApp Sky UI contract', () => {
|
|
it('uses the shared page, navbar, scroll owner, and pill navigation', () => {
|
|
expect(source).toContain('<SkyAppPage')
|
|
expect(source).toContain('<SkyNavbar')
|
|
expect(source).toContain('<SkyScrollArea')
|
|
expect(source).toContain('with-tabbar')
|
|
expect(source).toContain('<SkyPillNavigation')
|
|
expect(source).not.toContain(
|
|
'padding: 0 var(--sky-page-gutter) var(--sky-page-space)',
|
|
)
|
|
})
|
|
|
|
it('keeps every user-facing label in the locale tree', () => {
|
|
expect(source).toContain("phone.t('Apps.health.name')")
|
|
expect(source).toContain("phone.t('Apps.health.tabs.today')")
|
|
expect(source).toContain("phone.t('Apps.health.medicalId.title')")
|
|
})
|
|
|
|
it('uses the real Health NUI data flow', () => {
|
|
expect(source).toContain('void health.load()')
|
|
expect(source).toContain("nuiCall('calls:dial'")
|
|
expect(source).toContain('health.saveMedicalId')
|
|
})
|
|
})
|