Files
MyGoNavi/frontend/src/App.window-controls-spacing.test.ts
Syngnat 5e71ad0090 🎨 style(titlebar): 调整 Windows 窗口按钮间距
- 为 Windows 自绘标题栏控制组增加 4px 间距
- 保持其他平台及按钮尺寸、圆角和交互不变
- 新增平台选择器与间距接线回归测试
2026-07-23 10:14:52 +08:00

16 lines
713 B
TypeScript

import { readFileSync } from 'node:fs';
import { describe, expect, it } from 'vitest';
const appSource = readFileSync(new URL('./App.tsx', import.meta.url), 'utf8');
const appCssSource = readFileSync(new URL('./App.css', import.meta.url), 'utf8');
describe('Windows titlebar window controls spacing', () => {
it('adds a small platform-scoped gap between the custom window buttons', () => {
expect(appSource).toContain('className="titlebar-window-controls"');
expect(appSource).toContain("document.body.setAttribute('data-platform', runtimePlatform || '')");
expect(appCssSource).toMatch(
/body\[data-platform='windows'\]\s+\.titlebar-window-controls\s*\{[^}]*gap:\s*4px;/s,
);
});
});