优化展厅讲解卡片视觉

This commit is contained in:
lyf
2026-07-17 22:53:22 +08:00
parent f4e7a5f147
commit d8e5a84f02
10 changed files with 167 additions and 48 deletions

View File

@@ -35,6 +35,29 @@ describe('讲解展厅选择列表', () => {
expect(wrapper.emitted('hallClick')).toEqual([['hall-evolution']])
})
it('展厅阶段按卡片网格展示英文名和进入入口', () => {
const wrapper = mount(ExplainHallSelect, {
props: {
stage: 'hall',
halls: [{
id: 'hall-dinosaur',
name: '恐龙厅',
floorLabel: 'L-2',
explainCount: 35,
guideStopCount: 35,
searchText: '恐龙厅'
}]
}
})
const card = wrapper.get('.hall-overview-card')
expect(wrapper.get('.header-title').text()).toBe('展厅讲解')
expect(card.attributes('style')).toContain('--hall-card-color: #c7a15c')
expect(card.text()).toContain('Dinosaur Hall')
expect(card.text()).toContain('L-2 · 35 个讲解对象')
expect(card.get('.hall-go-entry').text()).toBe('GO ')
})
it('READY 讲解点不显示可讲解标签,非 READY 讲解点保留图文标签和点击事件', async () => {
const readyStop = {
id: 'stop-ready',