优化
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
|
||||
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
|
||||
|
||||
test('picking header omits persistent scanner help and keeps progress compact', async () => {
|
||||
const [page, styles] = await Promise.all([
|
||||
read('../pages/picking/picking.vue'),
|
||||
read('../styles/pda.scss')
|
||||
])
|
||||
|
||||
assert.doesNotMatch(page, /支持硬件广播扫码,也可点击输入后按“完成”确认/)
|
||||
assert.doesNotMatch(styles, /\.scan-hardware-tip/)
|
||||
assert.match(page, /已处理[\s\S]*?summary\.processed[\s\S]*?summary\.total[\s\S]*?>柜次<[\s\S]*?box-tasks-count[\s\S]*?completedCount[\s\S]*?boxes\.length[\s\S]*?box-tasks-arrow/)
|
||||
assert.match(styles, /\.progress-section \{[^}]*padding: 10px 12px/)
|
||||
assert.match(styles, /\.progress-actions \{[^}]*align-items: center;[^}]*gap: 8px/)
|
||||
assert.match(styles, /\.box-tasks-btn \{[^}]*height: 40px;[^}]*border: 0;[^}]*border-radius: 999px/)
|
||||
assert.match(styles, /\.box-tasks-count \{[^}]*font-weight: 700;/)
|
||||
assert.match(styles, /\.progress-bar-bg \{[^}]*height: 5px;[^}]*margin-top: 8px/)
|
||||
})
|
||||
Reference in New Issue
Block a user