22 lines
1.3 KiB
TypeScript
22 lines
1.3 KiB
TypeScript
import test from 'node:test'
|
|
import assert from 'node:assert/strict'
|
|
import { readSource } from './helpers.ts'
|
|
|
|
/** 对齐 admin.js:6296-6311(强制下载/空态) 与 6475-6495(成功留驻弹窗) 与 admin.html:6090-6110(弹窗文案)。 */
|
|
|
|
test('align_software_version_page_wiring', () => {
|
|
const page = readSource('src/pages/records/RecordsSoftwareVersionPage.vue')
|
|
// 下载按钮:<a download> 强制下载(对齐 admin.js:6301)。
|
|
assert.match(page, /download/, '下载链接带 download 强制下载')
|
|
assert.match(page, /download\s*>\s*下载\s*<\/a>/, '操作列下载为强制下载链接')
|
|
// 上传成功:弹窗保持打开,成功文案留驻可复制(对齐 admin.js:6484-6488)。
|
|
assert.match(page, /发布成功。版本:/, '成功文案留驻弹窗')
|
|
assert.match(page, /uploadMsg/, '成功/失败文案在弹窗内展示')
|
|
// 上传弹窗文案(对齐 admin.html:6094-6110)。
|
|
assert.match(page, /上传软件 ZIP 包,系统会自动计算 MD5 并存储到 OSS。/, '弹窗描述对齐')
|
|
assert.match(page, /上传软件版本/, '上传按钮名对齐')
|
|
assert.match(page, /上传新版本/, '弹窗标题对齐')
|
|
// 空态(对齐 admin.js:6296 暂无版本记录)。
|
|
assert.match(page, /暂无版本记录/, '空态文案对齐')
|
|
})
|