align(店铺数据记录): 改回每条任务一张卡片(店铺名头+任务号/状态+分组/最新/国家/文件行+下载文件/删除)、全选口径 file_ready&&有resultId 不再附加终态、空态文案对齐(对齐 admin.js renderShopDataRecordTable/syncShopDataSelectionUi)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readSource } from './helpers.ts'
|
||||
|
||||
/** 对齐 admin.js:1819-1860 renderShopDataRecordTable:每条任务一张卡片(店铺名头 + 任务号/状态 + 分组/最新/国家/文件行 + 下载文件/删除)。 */
|
||||
|
||||
test('align_shop_data_cards_per_task', () => {
|
||||
const page = readSource('src/pages/tasks/ShopDataTasksPage.vue')
|
||||
// 每任务一张卡:以 resultRow 迭代渲染卡片,不再按店铺聚合。
|
||||
assert.match(page, /v-for="row in allResultRows"/, '逐任务卡片渲染')
|
||||
assert.doesNotMatch(page, /v-for="group in groups"/, '去掉按店铺聚合卡片')
|
||||
// 卡片结构:店铺名头 + 任务号/状态 + 分组/最新/国家/文件 信息行 + 下载文件/删除。
|
||||
assert.match(page, /任务 {{ row\.taskNo \|\| row\.resultId }}|任务 {{ row\.taskNo/, '卡片含任务号')
|
||||
assert.match(page, />分组</, '卡片含分组行')
|
||||
assert.match(page, />最新</, '卡片含最新行')
|
||||
assert.match(page, />国家</, '卡片含国家行')
|
||||
assert.match(page, />文件</, '卡片含文件行')
|
||||
assert.match(page, /下载文件/, '按钮名对齐参考「下载文件」')
|
||||
})
|
||||
|
||||
test('align_shop_data_cards_selection_semantics', () => {
|
||||
const page = readSource('src/pages/tasks/ShopDataTasksPage.vue')
|
||||
// 参考 selectable = file_ready && resultId>0(不附加终态约束)。
|
||||
assert.match(page, /fileReady/, '可选依赖 fileReady')
|
||||
assert.doesNotMatch(page, /fileReady && isTerminalStatus/, '可选不再附加终态约束')
|
||||
assert.match(page, /全选可下载/, '全选语义保留')
|
||||
})
|
||||
|
||||
test('align_shop_data_cards_empty_text', () => {
|
||||
const page = readSource('src/pages/tasks/ShopDataTasksPage.vue')
|
||||
assert.match(page, /暂无符合条件的店铺数据任务/, '空态文案对齐参考')
|
||||
})
|
||||
Reference in New Issue
Block a user