精简首页加载页并补充品牌标识
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-13 17:37:41 +08:00
parent 140f13633e
commit d265089875
4 changed files with 132 additions and 234 deletions

View File

@@ -0,0 +1,26 @@
import { readFileSync } from 'node:fs'
import { fileURLToPath, URL } from 'node:url'
import { describe, expect, it } from 'vitest'
const indexPageSource = readFileSync(
fileURLToPath(new URL('../../src/pages/index/index.vue', import.meta.url)),
'utf8'
)
const launchOverlaySource = indexPageSource.slice(
indexPageSource.indexOf('v-if="launchOverlayVisible"'),
indexPageSource.indexOf('</GuidePageFrame>')
)
describe('首页精简加载页', () => {
it('仅展示图形标识、文字馆名和原生加载动效', () => {
expect(launchOverlaySource).toContain('/static/guide/museum-brand-icons.webp')
expect(launchOverlaySource).toContain('SHENZHEN NATURAL HISTORY MUSEUM')
expect(launchOverlaySource).toContain('深圳自然博物馆')
expect(launchOverlaySource).toContain('<progress')
expect(launchOverlaySource).not.toContain('app-launch-loading-lqip.webp')
expect(launchOverlaySource).not.toContain('app-launch-loading.webp')
expect(launchOverlaySource).not.toContain('app-launch-kicker')
expect(launchOverlaySource).not.toContain('app-launch-status')
})
})