Files
Ydisks-Xianyu-Helper/frontend/rulesFeature.test.ts
T
Christ fe3f715cdc feat: 完善聊天识别与规则页面响应式布局
- 按闲鱼协议字段识别官方系统消息、交易卡片和闲小蜜,清理空会话壳并补齐历史消息校正\n- 同步 README、项目展示页和 GitHub Wiki,补充在线聊天、账号自动评价与每日擦亮说明\n- 优化自动化规则页面的中等宽度布局,补充前端类型、响应式测试和嵌入资源
2026-08-08 23:48:42 +08:00

17 lines
693 B
TypeScript

import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { describe, expect, test } from 'vitest';
const source = (path: string) => readFileSync(resolve(__dirname, path), 'utf8');
describe('responsive rules layout', () => {
test('allows the rules page to shrink inside the sidebar layout', () => {
const app = source('App.tsx');
const rules = source('components/Rules.tsx');
expect(app).toContain('h-screen min-w-0 flex-1 overflow-x-hidden');
expect(rules).toContain('min-w-0 space-y-8');
expect(rules).toContain('xl:grid-cols-[minmax(270px,0.72fr)_minmax(0,1.28fr)]');
expect(rules).not.toContain('2xl:grid-cols-[360px_1fr]');
});
});