feat(需求): ①全站分页pageSize统一默认10+10/20/50/100选项(9页默认值15/20→10+6个兜底常量统一+撞款台账升级OldPagination+商品类目树顶层标准分页) ②修复6页OldPagination缺import分页器不渲染(不符合ASIN/查询ASIN/最低价ASIN/生成记录/店铺密钥/店铺管理)+查询ASIN操作列按钮间距+最低价范围筛选number类型报错 ③e2e断言对齐现状(顶栏h1/移除收起按钮后规格同步)+国家显示中文断言固化

This commit is contained in:
2026-09-07 02:36:35 +08:00
parent 056abcd473
commit 678605e9fb
44 changed files with 590 additions and 175 deletions
@@ -59,3 +59,11 @@ test('align_dedupe_registry_row_buttons_old_btn', () => {
assert.doesNotMatch(s, /el-button/, '去重汇总已自绘,无 EP 按钮')
assert.match(s, /window\.confirm\(`确定删除总数据/, '删除确认文案对齐旧版(原生 confirm)')
})
test('align_asin_actions_cell_spacing', () => {
// 反馈:查询ASIN操作按钮要有间距——asin-col-actions 统一 flex + gap 8px(对齐全站 ops-cell)。
for (const page of ['src/pages/asin/QueryAsinPage.vue', 'src/pages/asin/SkipPricePage.vue']) {
const s = readSource(page)
assert.match(s, /\.asin-col-actions\s*\{[^}]*gap:\s*8px/, `${page} 操作列按钮间距 8px`)
}
})
@@ -58,7 +58,7 @@ test('align_digital_human_api_download_url', () => {
test('align_digital_human_page_wiring', () => {
const page = readSource('src/pages/records/RecordsDigitalHumanVersionPage.vue')
assert.match(page, /pageSize\s*=\s*20|:page-size="20"/, '分页大小 20')
assert.match(page, /pageSize\s*=\s*ref\(10\)/, '分页大小默认 10(全站统一)')
assert.match(page, /page-nums/, '数字页码分页(像素复刻旧版)')
assert.match(page, /设为最新/, '按钮名对齐“设为最新”')
assert.match(page, /上传新版本/, '页头上传按钮名对齐')
@@ -43,6 +43,19 @@ test('align_dup_console_drawer_template', () => {
assert.match(page, /drawerSummary/, '抽屉渲染汇总徽章')
assert.match(page, /次上架/, '汇总含 N 次上架')
assert.match(page, /<th[^>]*>次数<\/th>/, '聚合表含次数列')
assert.match(page, /v-for="row in drawerRows"/, '抽屉聚合表绑定分页切片')
assert.match(page, /:total="drawerAggRows\.length"/, '抽屉聚合表有分页器')
})
test('align_dup_console_pagination_all_lists', () => {
// 全站统一收官:撞款页四处列表(分布/矩阵/撞款详情卡片/抽屉明细)均挂共享 OldPagination。
const page = readSource('src/pages/tasks/DuplicateCheckPage.vue')
assert.match(page, /:total="distCount"/, '店铺上架分布有分页器')
assert.match(page, /:total="dupRows\.length"/, '撞款覆盖矩阵有分页器')
assert.match(page, /v-for="item in dupCardRows"/, '撞款详情卡片绑定分页切片')
assert.match(page, /v-if="dupRows\.length > dupCardPageSize"/, '撞款详情卡片有分页器')
assert.match(page, /v-for="group in pagedGroupStats"/, '分组说明抽屉表绑定分页切片')
assert.match(page, /:total="groupStats\.length"/, '分组说明抽屉表有分页器')
})
test('align_dup_console_ledger_total_preload', () => {
@@ -75,3 +88,11 @@ test('align_dup_console_role_scope_group_controls_only_super', () => {
assert.match(service, /if \(superAdmin\) \{\s*return null;/, '超管可见范围=全量(null)')
assert.match(service, /selectManagedShopNames\(operatorId\)/, '普通管理员可见范围=所管分组店铺')
})
test('align_dup_console_country_labels_chinese', () => {
// 反馈:国家显示一定要用中文——站点/国家一律经 asinCountryLabel 映射,禁止裸国家码直出。
const page = readSource('src/pages/tasks/DuplicateCheckPage.vue')
assert.match(page, /asinCountryLabel\(/, '站点显示走中文映射函数')
assert.doesNotMatch(page, /\{\{\s*(row|item)\.country\s*\}\}/, '表格/抽屉无裸国家码直出')
assert.match(page, /asinCountryLabel\(code\)/, '筛选下拉站点显示中文')
})
@@ -61,3 +61,11 @@ test('align_image_video_page_card_info_wiring', () => {
assert.match(page, /copyLink\(task\.debugUrl\)/, '调试链接复制接线')
assert.match(page, /:disabled="!video\.displayUrl"|!hasDisplayUrl/, '下载按钮无视频禁用')
})
test('align_image_video_permission_table_pagination', () => {
// 权限配置弹窗用户表全量渲染无分页:补共享 OldPagination10/20/50/100)。
const page = readSource('src/pages/tasks/ImageVideoTasksPage.vue')
assert.match(page, /import OldPagination from '@\/components\/OldPagination\.vue'/, '分页组件已 import(曾缺失导致分页器不渲染)')
assert.match(page, /:data="pagedPermissionItems"/, '权限表绑定分页切片')
assert.match(page, /:total="permissionItems\.length"/, '权限表有分页器')
})
@@ -30,3 +30,10 @@ test('align_shop_data_cards_empty_text', () => {
const page = readSource('src/pages/tasks/ShopDataTasksPage.vue')
assert.match(page, /暂无符合条件的店铺数据记录/, '空态文案对齐参考')
})
test('align_shop_data_permission_table_pagination', () => {
// 权限配置弹窗用户表全量渲染无分页:补共享 OldPagination10/20/50/100)。
const page = readSource('src/pages/tasks/ShopDataTasksPage.vue')
assert.match(page, /:data="pagedPermissionItems"/, '权限表绑定分页切片')
assert.match(page, /:total="permissionItems\.length"/, '权限表有分页器')
})
+1 -1
View File
@@ -64,7 +64,7 @@ test('test_task_103_video_list_load_boundary_empty_input', () => {
const page = parseImageVideoPage({})
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.pageSize, 20)
assert.equal(page.pageSize, 10)
})
test('test_task_103_video_list_load_boundary_single_item', () => {
+1 -1
View File
@@ -79,7 +79,7 @@ test('test_task_110_shop_data_list_load_boundary_empty_input', () => {
const page = parseShopDataTaskPage({})
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.pageSize, 20)
assert.equal(page.pageSize, 10)
})
test('test_task_110_shop_data_list_load_boundary_single_item', () => {
+2 -2
View File
@@ -63,7 +63,7 @@ test('test_task_062_dedupe_list_boundary_empty_input', () => {
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.page, 1)
assert.equal(page.pageSize, 15)
assert.equal(page.pageSize, 10)
})
test('test_task_062_dedupe_list_boundary_single_item', () => {
@@ -84,7 +84,7 @@ test('test_task_062_dedupe_list_boundary_limit_or_missing_field', () => {
// 边界上限/缺字段:缺 page/pageSize 用默认;空 dataValue 保留空串。
const page = parseDedupeTotalPage({ items: [{ id: 9, dataValue: '' }], total: 0, page: 1 })
assert.equal(page.items[0].dataValue, '')
assert.equal(page.pageSize, 15)
assert.equal(page.pageSize, 10)
assert.equal(toDedupeTotalItem({ id: 10, dataValue: 'v' })?.dataValue, 'v')
})
+1 -1
View File
@@ -56,7 +56,7 @@ test('test_task_068_brand_db_list_boundary_empty_input', () => {
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.page, 1)
assert.equal(page.pageSize, 15)
assert.equal(page.pageSize, 10)
})
test('test_task_068_brand_db_list_boundary_single_item', () => {
+1 -1
View File
@@ -95,7 +95,7 @@ test('test_task_071_query_asin_list_boundary_empty_input', () => {
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.page, 1)
assert.equal(page.pageSize, 15)
assert.equal(page.pageSize, 10)
})
test('test_task_071_query_asin_list_boundary_single_item', () => {
+13 -1
View File
@@ -10,6 +10,7 @@ import {
} from '../src/pages/asin/skip-price-model.ts'
import { ASIN_COUNTRY_CODES, asinCountryLabel } from '../src/pages/asin/asin-country.ts'
import {
normalizePriceInput,
skipPriceFilterActive,
toSkipPriceParams,
toSkipPriceQuery,
@@ -84,7 +85,7 @@ test('test_task_075_skip_price_list_boundary_empty_input', () => {
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.page, 1)
assert.equal(page.pageSize, 15)
assert.equal(page.pageSize, 10)
})
test('test_task_075_skip_price_list_boundary_single_item', () => {
@@ -136,6 +137,17 @@ test('test_task_075_skip_price_filter_normal_primary_and_price', () => {
})
})
test('test_task_075_skip_price_filter_number_input_compat', () => {
// 原生 number input v-model 会把输入值转成 numbernormalizePriceInput 需兼容(修复 "(value||'').trim is not a function")。
const state: SkipPriceFilterState = { groupId: null, shopName: '', asin: '', country: '', minimumPriceFrom: 12.34, minimumPriceTo: 56.78 }
const query = toSkipPriceQuery(toSkipPriceParams(state, 1, 15))
assert.equal(query.minimum_price_from, 12.34)
assert.equal(query.minimum_price_to, 56.78)
assert.equal(normalizePriceInput(0), 0)
assert.equal(normalizePriceInput(-5), null)
assert.equal(normalizePriceInput(null as unknown as string), null)
})
test('test_task_075_skip_price_filter_invalid_input_rejected', () => {
// 异常输入:非法价格/负数/非数值价格丢弃;success=false 抛 message;垃圾行不入列表。
const state: SkipPriceFilterState = {
+1 -1
View File
@@ -102,7 +102,7 @@ test('test_task_078_product_category_search_boundary_empty_and_default', () => {
assert.deepEqual(page.items, [])
assert.equal(page.total, 0)
assert.equal(page.hasMore, false)
assert.equal(page.pageSize, 20)
assert.equal(page.pageSize, 10)
})
test('test_task_078_product_category_invalid_input_rejected', () => {