fix(order-list): add immersive custom navigation bar and return button with dual-theme adaptation

这个提交包含在:
xcbyy
2026-10-13 15:00:12 +08:00
父节点 e0236d1489
当前提交 63b18512f6
共有 2 个文件被更改,包括 160 次插入 和 15 次删除

查看文件

@@ -836,6 +836,42 @@ describe('ContentSecurityService & Compliance Architecture (TDD 微信内容安
expect(emojiRegex.test(fs.readFileSync(serverIndexPath, 'utf-8'))).toBe(false);
});
});
describe('19. 订单列表页面沉浸式导航栏与返回按钮规范验证 (pages/order/list.vue)', () => {
const orderListPath = path.join(rootDir, 'pwuniapp', 'pages', 'order', 'list.vue');
it('订单列表页面必须包含 custom-nav-bar 沉浸式导航栏与返回上一级按钮', () => {
expect(fs.existsSync(orderListPath)).toBe(true);
const content = fs.readFileSync(orderListPath, 'utf-8');
expect(content).toContain('custom-nav-bar');
expect(content).toContain('btn-nav-back');
expect(content).toContain('handleBack');
expect(content).toContain('nav-title');
expect(content).toContain('我的订单');
expect(content).toContain('nav-capsule-placeholder');
});
it('必须包含智能返回上一级与首页兜底路由控制逻辑', () => {
const content = fs.readFileSync(orderListPath, 'utf-8');
expect(content).toContain('getCurrentPages()');
expect(content).toContain('uni.navigateBack()');
expect(content).toContain('uni.switchTab');
});
it('必须适配微信小程序胶囊安全避让变量与冷暖双主题', () => {
const content = fs.readFileSync(orderListPath, 'utf-8');
expect(content).toContain('--safe-header-gap');
expect(content).toContain('--capsule-right-space');
expect(content).toContain('--capsule-height');
expect(content).toContain('.order-list-container.theme-warm');
});
it('订单列表页面源码与测试严禁包含任何系统 Emoji 违规字符', () => {
const content = fs.readFileSync(orderListPath, 'utf-8');
const emojiRegex = /(?:\p{Extended_Pictographic}|\p{Emoji_Presentation}|[\u2600-\u27BF])/u;
expect(emojiRegex.test(content)).toBe(false);
});
});
});