diff --git a/admin-frontend-vue/src/pages/shop/ShopKeysPage.vue b/admin-frontend-vue/src/pages/shop/ShopKeysPage.vue index 4f7b2ee6..caeb4ea1 100644 --- a/admin-frontend-vue/src/pages/shop/ShopKeysPage.vue +++ b/admin-frontend-vue/src/pages/shop/ShopKeysPage.vue @@ -1,8 +1,9 @@ diff --git a/admin-frontend-vue/src/pages/shop/ShopManagePage.vue b/admin-frontend-vue/src/pages/shop/ShopManagePage.vue index 0250a677..c7de9aa1 100644 --- a/admin-frontend-vue/src/pages/shop/ShopManagePage.vue +++ b/admin-frontend-vue/src/pages/shop/ShopManagePage.vue @@ -1,8 +1,9 @@ diff --git a/admin-frontend-vue/tests/align-column-width.test.ts b/admin-frontend-vue/tests/align-column-width.test.ts index b78de4a8..b07a4b60 100644 --- a/admin-frontend-vue/tests/align-column-width.test.ts +++ b/admin-frontend-vue/tests/align-column-width.test.ts @@ -7,8 +7,6 @@ import { readSource } from './helpers.ts' // 例外:DuplicateCheckPage 不动;dialog/表单的 width 不属于表格列。 const PAGES = [ - 'src/pages/shop/ShopKeysPage.vue', - 'src/pages/shop/ShopManagePage.vue', 'src/pages/records/RecordsDigitalHumanVersionPage.vue', 'src/pages/records/RecordsSoftwareVersionPage.vue', 'src/pages/tasks/ImageVideoTasksPage.vue', @@ -63,6 +61,8 @@ test('align_column_width_boundary_empty_input', () => { ['src/pages/asin/QueryAsinPage.vue', 'query-asin-table-scroll'], ['src/pages/asin/SkipPricePage.vue', 'skip-price-asin-table-scroll'], ['src/pages/asin/ProductCategoryPage.vue', 'category-table-scroll'], + ['src/pages/shop/ShopKeysPage.vue', 'shop-key-table-scroll'], + ['src/pages/shop/ShopManagePage.vue', 'shop-manage-table-scroll'], ]) { const src = readSource(page) assert.equal(/el-table-column/.test(src), false, `${page} 已像素复刻原生表格,不再有 el-table-column`) diff --git a/admin-frontend-vue/tests/align-pagination.test.ts b/admin-frontend-vue/tests/align-pagination.test.ts index 199bbc4e..c7ad07f8 100644 --- a/admin-frontend-vue/tests/align-pagination.test.ts +++ b/admin-frontend-vue/tests/align-pagination.test.ts @@ -43,13 +43,7 @@ test('align_pagination_boundary_single_item', () => { }) test('align_pagination_repeated_operation_is_idempotent', () => { - // 已有分页的页面保持原样,不被破坏;已像素复刻(自绘旧式分页/原生表格)的页单独断言。 - for (const page of [ - 'src/pages/shop/ShopManagePage.vue', - ]) { - const src = readSource(page) - assert.match(src, /el-pagination/, `${page} 既有分页保留`) - } + // 已像素复刻(自绘旧式分页/原生表格)的页单独断言。 const users = readSource('src/pages/account/UsersPage.vue') assert.match(users, /class="pagination"/, '用户页已像素复刻,用旧式分页容器') assert.doesNotMatch(users, /el-pagination/, '用户页不再用 EP 分页') @@ -59,4 +53,10 @@ test('align_pagination_repeated_operation_is_idempotent', () => { const invalid = readSource('src/pages/asin/AsinInvalidPage.vue') assert.match(invalid, /class="pagination"/, '品牌库已像素复刻,用旧式分页容器') assert.doesNotMatch(invalid, /el-pagination/, '品牌库不再用 EP 分页') + const shops = readSource('src/pages/shop/ShopManagePage.vue') + assert.match(shops, /class="pagination"/, '店铺管理已像素复刻,用旧式分页容器') + assert.doesNotMatch(shops, /el-pagination/, '店铺管理不再用 EP 分页') + const keys = readSource('src/pages/shop/ShopKeysPage.vue') + assert.match(keys, /class="pagination"/, '店铺密钥已像素复刻,用旧式分页容器') + assert.doesNotMatch(keys, /el-pagination/, '店铺密钥不再用 EP 分页') }) diff --git a/admin-frontend-vue/tests/align-shop-columns.test.ts b/admin-frontend-vue/tests/align-shop-columns.test.ts index 6496ed65..519f18ee 100644 --- a/admin-frontend-vue/tests/align-shop-columns.test.ts +++ b/admin-frontend-vue/tests/align-shop-columns.test.ts @@ -15,12 +15,13 @@ test('align_shop_keys_columns', () => { test('align_shop_manage_columns_order_and_labels', () => { const page = readSource('src/pages/shop/ShopManagePage.vue') - assert.doesNotMatch(page, /label="序号"/, '不再展示序号列') + // 像素复刻旧版 panel-shop-manage:序号列保留(admin.html:5339)。 + assert.match(page, /序号/, '按旧版展示序号列') assert.doesNotMatch(page, /label="ID"/, '不展示 ID 列') - // 列序:分组 → 店铺名 → 店铺商城名 → 自动化账号 → 账号 → 密码(对齐 admin.html:5339-5348)。 - const table = page.slice(page.indexOf('商城]*text[^>]*@click="${action}`), `${action} 不再 text`) } -test('align_shop_manage_row_buttons_solid', () => { +test('align_shop_manage_row_buttons_old_btn', () => { const s = readSource('src/pages/shop/ShopManagePage.vue') - assertRowButtonSolid(s, 'openEdit') - assertRowButtonSolid(s, 'showCredential') - assertRowButtonSolid(s, 'remove') + assert.match(s, /class="btn btn-sm"[^>]*@click="openEdit\(row\)"/, '编辑用旧版 btn-sm 实心小按钮') + assert.match(s, /class="btn btn-sm btn-secondary"[^>]*@click="showCredential\(row\)"/, '凭证用旧版 btn-sm btn-secondary') + assert.match(s, /class="btn btn-sm btn-danger"[^>]*@click="remove\(row\)"/, '删除用旧版 btn-sm btn-danger') + assert.doesNotMatch(s, /el-button[^>]*@click="openEdit/, '行内不再用 EP 按钮') + assert.match(s, /window\.confirm\(`确定删除店铺/, '删除确认原生 confirm 对齐旧版') }) -test('align_shop_keys_row_buttons_solid', () => { +test('align_shop_keys_row_buttons_old_btn', () => { const s = readSource('src/pages/shop/ShopKeysPage.vue') - assertRowButtonSolid(s, 'openEdit') - assertRowButtonSolid(s, 'remove') + assert.match(s, /class="btn btn-sm"[^>]*@click="openEdit\(row\)"/, '编辑用旧版 btn-sm 实心小按钮') + assert.match(s, /class="btn btn-sm btn-danger"[^>]*@click="remove\(row\)"/, '删除用旧版 btn-sm btn-danger') + assert.doesNotMatch(s, /el-button[^>]*@click="openEdit/, '行内不再用 EP 按钮') }) test('align_records_history_thumb_click_opens_preview', () => {