import { readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' const source = readFileSync( new URL('./SpringboardWidget.vue', import.meta.url), 'utf8', ) describe('SpringboardWidget UI contract', () => { it('uses the Sky widget frame without a Konsta surface', () => { expect(source).toContain(' { expect(source).toContain('class="home-widget-open"') expect(source).toContain('@click.stop="openWidget"') expect(source).toContain('position: absolute;') expect(source).toContain('background: transparent;') }) it('shows the reactive clock time in the calendar header', () => { expect(source).toContain('class="widget-date-time"') expect(source).toContain('{{ clock.time.value }}') expect(source).toContain('font-variant-numeric: tabular-nums;') }) it('reuses weather artwork and music metadata from the owning apps', () => { expect(source).toContain(' { expect(source).toContain(`data-weather-condition='${condition}'`) }) })