fix(工作台): 视频详情首行改「标签」标签+标签内容+查看视频链接合并,删原第4行标签

This commit is contained in:
maogeigei committed 2026-09-01 15:16:20 +08:00
1 parent 9db964bf99
commit 1cea55b0eb
3 files changed
+6 -6

No files matched your search

@@ -72,14 +72,14 @@ async function main() {
})()`);
check('toolbar 显示视频标题名称(非静态"视频详情"): ' + r.toolbarTitle, !!r.toolbarTitle && r.toolbarTitle !== '视频详情' && r.toolbarTitle.length > 2, r.toolbarTitle);
check('信息卡共 4 组行', r.rowCount === 4);
check('首行标签=「视频地址」: ' + r.firstLabel, r.firstLabel === '视频地址', r.firstLabel);
check('首行「查看视频」在标签后面: ' + r.firstText, r.firstText.includes('查看视频') && r.firstText.indexOf('查看视频') > r.firstText.indexOf('视频地址'), r.firstText);
check('信息卡共 3 组行', r.rowCount === 3);
check('首行标签=「标签」: ' + r.firstLabel, r.firstLabel === '标签', r.firstLabel);
check('首行含标签内容(逗号分隔文本): ' + r.firstText, /^标签[\u4e00-\u9fa5A-Za-z0-9,, ]/.test(r.firstText) && r.firstText.includes('查看视频'), r.firstText);
check('首行「查看视频」在标签内容后面: ' + r.firstText, r.firstText.includes('查看视频') && r.firstText.indexOf('查看视频') > r.firstText.indexOf('#'), r.firstText);
check('首行不含具体 URL 明文', !/https?:\/\//.test(r.firstText), r.firstText);
check('首行链接可点击(https): ' + (r.firstHref || '').slice(0, 40), !!r.firstHref && /^https?:/.test(r.firstHref), r.firstHref || '');
check('第2行=账号/视频ID/时长/发布时间', JSON.stringify(r.rowLabels[0]) === JSON.stringify(['账号', '视频ID', '时长', '发布时间']), JSON.stringify(r.rowLabels[0]));
check('第3行=点赞/评论/分享/收藏', JSON.stringify(r.rowLabels[1]) === JSON.stringify(['点赞', '评论', '分享', '收藏']), JSON.stringify(r.rowLabels[1]));
check('第4行=标签', JSON.stringify(r.rowLabels[2]) === JSON.stringify(['标签']), JSON.stringify(r.rowLabels[2]));
check('无渲染失败', !r.hasRenderErr);
console.log(`\n结果: ${pass} PASS / ${fail} FAIL`);