优化讲解展厅与对象列表视觉
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-18 01:16:30 +08:00
parent b8ab414bac
commit 5a711377b0
16 changed files with 161 additions and 121 deletions

View File

@@ -28,14 +28,14 @@ describe('讲解展厅选择列表', () => {
const cards = wrapper.findAll('.hall-card')
expect(cards).toHaveLength(1)
expect(wrapper.text()).toContain('生命演化厅')
expect(wrapper.text()).toContain('6 个讲解对象')
expect(wrapper.text()).not.toContain('6 个讲解对象')
expect(wrapper.text()).not.toContain('业务单元')
await cards[0]?.trigger('tap')
expect(wrapper.emitted('hallClick')).toEqual([['hall-evolution']])
})
it('展厅阶段按卡片网格展示英文名和进入入口', () => {
it('展厅阶段按主题色卡展示展厅名称和图标', () => {
const wrapper = mount(ExplainHallSelect, {
props: {
stage: 'hall',
@@ -52,10 +52,11 @@ describe('讲解展厅选择列表', () => {
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 ')
expect(card.attributes('style')).toContain('--hall-card-color: #d9b06c')
expect(card.text()).toContain('恐龙厅')
expect(card.text()).not.toContain('Dinosaur Hall')
expect(card.text()).not.toContain('35 个讲解对象')
expect(card.find('.hall-go-entry').exists()).toBe(false)
})
it('READY 讲解点不显示可讲解标签,非 READY 讲解点保留图文标签和点击事件', async () => {