align(软件版本): 操作列下载改<a download>强制下载、上传成功留驻弹窗(发布成功。版本:X,链接:Y可复制)、按钮名上传软件版本/弹窗标题上传新版本/描述与zip提示对齐、空态暂无版本记录(对齐 admin.js loadSoftwareVersions/上传段+admin.html:6094-6110)

This commit is contained in:
2026-09-05 23:30:14 +08:00
parent 553aca34f7
commit c915847d92
3 changed files with 58 additions and 16 deletions
@@ -0,0 +1,21 @@
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, /暂无版本记录/, '空态文案对齐')
})