8d44d54dc7
build / build (push) Successful in 1m14s
去掉系统已打开页面页签及无用关闭入口和样式;保留面包屑、来源路径与分页。左侧文字16px、图标20px,导航项最小44px。 验证:顶部页签移除与导航字号回归分别先红后绿,相关测试和类型检查通过;完整门禁与部署验收待执行。
21 lines
988 B
TypeScript
21 lines
988 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
// @ts-expect-error The test runner provides Node; the browser bundle intentionally omits @types/node.
|
|
import { readFileSync } from 'node:fs'
|
|
|
|
const styles = readFileSync(new URL('./styles.css', import.meta.url), 'utf8')
|
|
|
|
describe('mobile workspace navigation styles', () => {
|
|
it('keeps the hamburger navigation and collapses only source context on narrow screens', () => {
|
|
expect(styles).toMatch(/@media \(max-width: 760px\)[\s\S]*?\.workspace-context-tabs\s*\{\s*display:\s*none;/)
|
|
})
|
|
it('enlarges sidebar labels and icons with comfortable navigation targets', () => {
|
|
const item = styles.match(/\.nav-item\s*\{([^}]+)\}/)![1]
|
|
const icon = styles.match(/\.nav-icon\s*\{([^}]+)\}/)![1]
|
|
expect(item).toMatch(/font-size:\s*16px;/)
|
|
expect(item).toMatch(/min-height:\s*44px;/)
|
|
expect(icon).toMatch(/font-size:\s*20px;/)
|
|
expect(icon).toMatch(/width:\s*24px;/)
|
|
expect(icon).toMatch(/height:\s*24px;/)
|
|
})
|
|
})
|