feat(admin): 最低价ASIN列表操作列新增整条删除按钮——后端DELETE /skip-price-asins/{id}(权限校验+日志),前端确认弹窗+删空页回退,补单测与对齐测试
This commit is contained in:
@@ -97,3 +97,17 @@ test('align_skip_price_filter_price_range_same_row', () => {
|
||||
assert.match(page, /placeholder="最高价 ≤"/, '上限占位文案(旧版)')
|
||||
assert.ok(!page.includes('label="最低价 ≥"'), '不再有独立的最低价 ≥ 筛选项')
|
||||
})
|
||||
|
||||
test('align_skip_price_action_delete_button_wiring', () => {
|
||||
// 操作列新增整条删除:确认弹窗 + DELETE /skip-price-asins/{id} + 删空页回退。
|
||||
const page = readSource('src/pages/asin/SkipPricePage.vue')
|
||||
assert.match(page, /btn-danger/, '删除按钮使用危险样式')
|
||||
assert.match(page, /@click="removeRow/, '按钮绑定整条删除')
|
||||
assert.match(page, /ElMessageBox\.confirm/, '删除前二次确认')
|
||||
assert.match(page, /确定删除「/, '确认文案含店铺名')
|
||||
assert.match(page, /deleteSkipPriceAsin\(item\.id\)/, '调用整条删除 API')
|
||||
assert.match(page, /page\.value -= 1/, '删空当前页后回退一页')
|
||||
const api = readSource('src/pages/asin/skip-price-detail-api.ts')
|
||||
assert.match(api, /deleteSkipPriceAsin/, '导出整条删除函数')
|
||||
assert.match(api, /SKIP_PRICE_DETAIL_ENDPOINT}\/\$\{id\}/, '删除端点指向整条记录')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user