From 58887d928ad0c3efd5b79042ff9856db8b423c93 Mon Sep 17 00:00:00 2001 From: lyf <2514544224@qq.com> Date: Sat, 18 Jul 2026 13:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=82=B9=E4=BD=8D=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E8=A1=8C=E7=A8=8B=E5=BF=AB=E6=8D=B7=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/domain/poiCategories.ts | 1 - tests/unit/PoiSearchPanel.spec.ts | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/domain/poiCategories.ts b/src/domain/poiCategories.ts index 9e915f8..4455a1b 100644 --- a/src/domain/poiCategories.ts +++ b/src/domain/poiCategories.ts @@ -158,7 +158,6 @@ export const POI_CATEGORIES = Object.freeze( ) const homeCategoryOrder: readonly PoiCategoryId[] = [ - 'itinerary', 'exhibition-hall', 'cinema', 'restroom', diff --git a/tests/unit/PoiSearchPanel.spec.ts b/tests/unit/PoiSearchPanel.spec.ts index 46beb74..974185c 100644 --- a/tests/unit/PoiSearchPanel.spec.ts +++ b/tests/unit/PoiSearchPanel.spec.ts @@ -103,7 +103,7 @@ describe('POI 搜索面板实际渲染与状态闭环', () => { expect(wrapper.find('.voice-icon').exists()).toBe(false) }) - it('首页收缩和展开复用同一份十项快捷入口,搜索页保留完整分类', async () => { + it('首页收缩和展开复用同一份九项快捷入口,搜索页保留完整分类', async () => { const escalatorPoi = createPoi('escalator-1', '自动扶梯', 'floor-1', '1F', 'escalator', [5, 0, 5]) guideMocks.getInitialSearchSpacePoints.mockResolvedValue([...poiPool, escalatorPoi]) const homeWrapper = mount(PoiSearchPanel, { @@ -116,13 +116,13 @@ describe('POI 搜索面板实际渲染与状态闭环', () => { await flushMountedSearch() const homeCategories = homeWrapper.findAll('.home-category-chip') - expect(homeCategories).toHaveLength(10) + expect(homeCategories).toHaveLength(9) expect(homeCategories.map((item) => item.text())).toEqual([ - '行程', '展览', '影院', '洗手间', '餐厅', - '售票处', '母婴室', '服务中心', '电梯', '扶梯' + '展览', '影院', '洗手间', '餐厅', '售票处', + '母婴室', '服务中心', '电梯', '扶梯' ]) expect(homeCategories.slice(0, 5).map((item) => item.text())).toEqual([ - '行程', '展览', '影院', '洗手间', '餐厅' + '展览', '影院', '洗手间', '餐厅', '售票处' ]) homeCategories.forEach((item) => { expect(item.find('.poi-category-icon').exists()).toBe(true) @@ -139,10 +139,10 @@ describe('POI 搜索面板实际渲染与状态闭环', () => { await homeWrapper.get('.search-box').trigger('tap') await flushMountedSearch() const expandedCategories = homeWrapper.findAll('.home-shortcut-grid .category-item') - expect(expandedCategories).toHaveLength(10) + expect(expandedCategories).toHaveLength(9) expect(expandedCategories.map((item) => item.text())).toEqual([ - '行程', '展览', '影院', '洗手间', '餐厅', - '售票处', '母婴室', '服务中心', '电梯', '扶梯' + '展览', '影院', '洗手间', '餐厅', '售票处', + '母婴室', '服务中心', '电梯', '扶梯' ]) expect(expandedCategories.slice(0, 5).map((item) => item.text())) .toEqual(homeCategories.slice(0, 5).map((item) => item.text())) @@ -295,7 +295,7 @@ describe('POI 搜索面板实际渲染与状态闭环', () => { expect(wrapper.find('[data-testid="poi-home-category-results"]').exists()).toBe(false) expect(wrapper.find('.poi-search-content').exists()).toBe(false) - expect(wrapper.findAll('.home-category-chip')).toHaveLength(10) + expect(wrapper.findAll('.home-category-chip')).toHaveLength(9) expect(wrapper.findAll('.home-category-chip.active')).toHaveLength(0) expect((wrapper.get('.search-input').element as HTMLInputElement).value).toBe('') expect((wrapper.emitted('results-change') || []).at(-1)?.[0]).toMatchObject({