同步 sgs-frontend-mobile 源码
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-27 11:26:01 +08:00
parent 575dca430f
commit 9ea1bfab71
181 changed files with 24395 additions and 5212 deletions

View File

@@ -162,7 +162,7 @@ describe('点位详情实际渲染与返回闭环', () => {
})
})
it('只展示真实详情字段,并发送正确的位置预览请求', async () => {
it('详情页只展示名称和楼层,并发送正确的位置预览请求', async () => {
const wrapper = mountDetail()
await loadDetail({
@@ -175,8 +175,9 @@ describe('点位详情实际渲染与返回闭环', () => {
const sheet = wrapper.get('[data-testid="facility-detail-sheet"]')
expect(sheet.classes()).toContain('guide-poi-card')
expect(sheet.text()).toContain('二层卫生间')
expect(sheet.text()).toContain('类别洗手间')
expect(sheet.text()).toContain('楼层2F')
expect(sheet.text()).toContain('2F')
expect(sheet.find('[data-testid="facility-detail-meta"]').exists()).toBe(false)
expect(sheet.text()).not.toContain('洗手间')
expect(sheet.text()).not.toContain('可无障碍到达')
expect(sheet.text()).not.toContain('展示点位')
expect(sheet.text()).not.toContain('已在对应楼层模型中标出点位')
@@ -190,7 +191,7 @@ describe('点位详情实际渲染与返回闭环', () => {
})
})
it('详情复用统一分类名称,不回退到 SDK 原始空间类别', async () => {
it('空间类型详情同样只展示名称和楼层', async () => {
mocks.getPoiById.mockResolvedValue(cinemaPoi)
const wrapper = mountDetail()
@@ -204,8 +205,10 @@ describe('点位详情实际渲染与返回闭环', () => {
})
const sheetText = wrapper.get('[data-testid="facility-detail-sheet"]').text()
expect(sheetText).toContain('类别影院')
expect(sheetText).toContain('球幕影院')
expect(sheetText).toContain('1F')
expect(sheetText).not.toContain('剧场空间')
expect(wrapper.find('[data-testid="facility-detail-meta"]').exists()).toBe(false)
})
it('搜索多结果关闭详情后返回原结果列表', async () => {
@@ -278,7 +281,8 @@ describe('点位详情实际渲染与返回闭环', () => {
expect(wrapper.get('[data-testid="facility-location-error"]').text())
.toContain('位置数据加载失败,请稍后重试')
expect(wrapper.get('[data-testid="facility-detail-meta"]').text()).toContain('楼层2F')
expect(wrapper.text()).toContain('2F')
expect(wrapper.find('[data-testid="facility-detail-meta"]').exists()).toBe(false)
})
it('点位缺少楼层时显示可见兜底且不发送无效定位请求', async () => {
@@ -292,8 +296,8 @@ describe('点位详情实际渲染与返回闭环', () => {
await loadDetail({ id: 'poi-without-floor', target: '楼层缺失点位' })
expect(wrapper.get('[data-testid="facility-detail-meta"]').text())
.toContain('楼层楼层信息缺失')
expect(wrapper.text()).toContain('楼层信息缺失')
expect(wrapper.find('[data-testid="facility-detail-meta"]').exists()).toBe(false)
expect(wrapper.get('[data-testid="facility-location-error"]').text())
.toContain('缺少楼层信息')
expect(wrapper.getComponent(GuideMapShellStub).props('targetFocusRequest')).toBeNull()