feat: update agreements and refine miniapp layouts and integrations

This commit is contained in:
zhouzhibo committed 2026-10-21 20:33:50 +08:00
1 parent 38fc4187ea
commit 7871114c50
26 files changed
+2018 -120

No files matched your search

+17
View File
@@ -34,6 +34,23 @@ test('真实状态不预置财神,按后端持有ID提交,后端确认后才
assert.equal(h.store.snapshot().deities.wealth.incenseCount, 8)
assert.equal(h.store.snapshot().deities.wealth.incenseUntil, 16000)
})
test('列表图、详情图、介绍独立保存,刷新及切换账号不串用旧素材', async () => {
const h = harness()
h.rows([{ id: 81, name: '财神', holdingId: 726, active: true, incenseCount: 7, days: 3,
iconUrl: '/file/list.png', iconDetailUrl: '/file/detail.png', description: '接口介绍\n第二行' }])
await h.store.refresh()
const first = h.store.snapshot().deities.wealth
assert.equal(first.iconUrl, '/file/list.png'); assert.equal(first.iconDetailUrl, '/file/detail.png')
assert.equal(first.description, '接口介绍\n第二行')
h.rows([{ id: 81, name: '财神', active: false, incenseCount: 0, days: 0,
iconUrl: '/file/new-list.png', iconDetailUrl: '/file/new-detail.png', description: '更新的介绍' }])
await h.store.refresh(true)
const second = h.store.snapshot().deities.wealth
assert.equal(second.unlocked, false); assert.equal(second.iconDetailUrl, '/file/new-detail.png')
assert.equal(second.description, '更新的介绍')
h.key('another-account')
assert.equal(h.store.snapshot().deities.wealth.iconDetailUrl, undefined)
})
test('失败无计数无自动重试;晚到查询不覆盖已确认上香', async () => {
const h = harness(); await h.store.refresh()
h.offer(async () => { throw new Error('网络失败') })