Files
hermes-ui/tests/client/pwa-metadata.test.ts
T
toor c93e1fe1bd
Build / build (push) Canceled after 0s
NPM Lockfile Check / npm ci --ignore-scripts (push) Canceled after 0s
Playwright / e2e (push) Canceled after 0s
Phase 002: rebrand to hermes-ui and consolidate i18n to zh/en
Removes the ekko / hermes-web-ui branding from the whole tree and drops
eight locale files, so the project presents one name and one language pair.

Data compatibility is deliberate, not accidental: DB filenames, the JWT
audience, and skill manifest ownership all still recognise their pre-rename
values so existing deployments under ~/.hermes-web-ui keep working without a
re-login or a re-injection.

scripts/harness-check.mjs now scans for the legacy strings and fails the
build on any new occurrence, with an explicit allow-list (and reasons) for
the compatibility paths that must keep them.
2026-10-16 11:11:29 +08:00

28 lines
1006 B
TypeScript

import { readFileSync } from 'fs'
import { describe, expect, it } from 'vitest'
describe('PWA metadata', () => {
it('links manifest and touch icon from the client shell', () => {
const html = readFileSync('packages/client/index.html', 'utf8')
expect(html).toContain('rel="manifest" href="/manifest.webmanifest"')
expect(html).toContain('rel="apple-touch-icon" href="/logo.png"')
expect(html).toContain('name="apple-mobile-web-app-title" content="hermes-ui"')
})
it('ships a standalone web manifest with the Hermes icon', () => {
const manifest = JSON.parse(readFileSync('packages/client/public/manifest.webmanifest', 'utf8'))
expect(manifest.name).toBe('hermes-ui')
expect(manifest.display).toBe('standalone')
expect(manifest.start_url).toBe('/#/hermes/chat')
expect(manifest.icons).toEqual(expect.arrayContaining([
expect.objectContaining({
src: '/logo.png',
type: 'image/png',
purpose: 'any maskable',
}),
]))
})
})