From 0248c8737d32163ca4c7be4914dc159303bf30de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sat, 5 Sep 2026 21:34:55 +0800 Subject: [PATCH] =?UTF-8?q?task-258(admin.html=E8=A7=82=E6=84=9F=E5=AF=B9?= =?UTF-8?q?=E9=BD=90):=20=E6=9C=80=E4=BD=8E=E4=BB=B7ASIN=E9=A1=B5=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=EF=BC=88=E4=BB=B7=E6=A0=BC=E5=8C=BA=E9=97=B4=E7=AD=9B?= =?UTF-8?q?=E9=80=89/=E9=85=8D=E7=BD=AE=E6=8A=BD=E5=B1=89ASIN+=E6=9C=80?= =?UTF-8?q?=E4=BD=8E=E4=BB=B7/=E5=AF=BC=E5=85=A5=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=AF=BC=E5=85=A5/=E5=AF=BC=E5=87=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/asin/SkipPricePage.vue | 395 ++++++++++++++++++ admin-frontend-vue/tests/task-258.test.ts | 57 +++ 2 files changed, 452 insertions(+) create mode 100644 admin-frontend-vue/src/pages/asin/SkipPricePage.vue create mode 100644 admin-frontend-vue/tests/task-258.test.ts diff --git a/admin-frontend-vue/src/pages/asin/SkipPricePage.vue b/admin-frontend-vue/src/pages/asin/SkipPricePage.vue new file mode 100644 index 00000000..e86e836f --- /dev/null +++ b/admin-frontend-vue/src/pages/asin/SkipPricePage.vue @@ -0,0 +1,395 @@ + + + + + diff --git a/admin-frontend-vue/tests/task-258.test.ts b/admin-frontend-vue/tests/task-258.test.ts new file mode 100644 index 00000000..134592ba --- /dev/null +++ b/admin-frontend-vue/tests/task-258.test.ts @@ -0,0 +1,57 @@ +import test from 'node:test' +import assert from 'node:assert/strict' +import { readSource } from './helpers.ts' + +// module 13 task 258:最低价ASIN页对齐 admin panel-skip-price-asin —— 价格范围筛选生效、 +// 行内「配置」抽屉(逐国 ASIN+最低价,留空=删除、低价必带 ASIN 校验)、导入添加/删除导入/导出。 + +test('test_task_258_skipprice_normal_primary_path', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /updateSkipPriceCountry/, '需接线逐国 PUT(ASIN+最低价)') + assert.match(page, /deleteSkipPriceCountry/, '需接线逐国 DELETE') + assert.match(page, /配置/, '行内需配置入口') + assert.match(page, /留空表示删除该站点/, '抽屉需留空删除语义') +}) + +test('test_task_258_skipprice_normal_variant_input', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /填写最低价时必须填写 ASIN/, '低价必带 ASIN 校验文案') + assert.match(page, /最低价格式不正确/, '低价格式校验文案') + assert.match(page, /导入添加/, '页头导入添加') + assert.match(page, /导入删除/, '页头删除导入') + assert.match(page, /导出/, '页头导出') +}) + +test('test_task_258_skipprice_normal_repeated_operation_is_idempotent', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.ok(page.includes('配置')) + assert.ok(page.includes('最低价')) +}) + +test('test_task_258_skipprice_boundary_empty_input', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /startSkipPriceImport|fetchSkipPriceImportProgress/, '需接线导入添加') + assert.match(page, /toUpperCase/, 'ASIN 需自动大写') + assert.match(page, /minimumPriceFrom/, '价格范围筛选需保留') +}) + +test('test_task_258_skipprice_boundary_single_item', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /请选择分组|分组后再导入/, '导入需分组必选(后端必填)') +}) + +test('test_task_258_skipprice_boundary_limit_or_missing_field', () => { + const api = readSource('src/pages/asin/skip-price-detail-api.ts') + assert.match(api, /minimumPrice/, '详情 API 需含最低价') +}) + +test('test_task_258_skipprice_invalid_input_rejected', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /批量删除|确定按 Excel/, '删除导入需前置确认') + assert.match(page, /skip-price-asins\/export|导出/, '需导出能力') +}) + +test('test_task_258_skipprice_dependency_failure_returns_actionable_message', () => { + const page = readSource('src/pages/asin/SkipPricePage.vue') + assert.match(page, /toSkipPriceParams/, '筛选需含最低价区间归一') +})