feat: add product archive management page
This commit is contained in:
@@ -54,3 +54,20 @@ test('new product creation archives with the created product id instead of a dra
|
||||
assert.match(dialog, /await createManualProduct\(token, \{ name, sku, specification \}\)/);
|
||||
assert.match(dialog, /archiveProductVersion\(token, product\.product_id, document, previewBlob\)/);
|
||||
});
|
||||
|
||||
test('app routes to product archives and list keeps IDs out of primary cells', async () => {
|
||||
const app = await readFile('frontend/src/App.tsx', 'utf8');
|
||||
const page = await readFile('frontend/src/pages/ProductArchivePage.tsx', 'utf8');
|
||||
assert.match(app, /'products'/);
|
||||
assert.match(page, /产品档案/);
|
||||
assert.match(page, /产品名称/);
|
||||
assert.doesNotMatch(page, /<td>\{product\.product_id\}<\/td>/);
|
||||
});
|
||||
|
||||
test('product archive page exposes restore and soft delete actions', async () => {
|
||||
const page = await readFile('frontend/src/pages/ProductArchivePage.tsx', 'utf8');
|
||||
assert.match(page, /恢复产品/);
|
||||
assert.match(page, /软删除/);
|
||||
assert.match(page, /系统信息/);
|
||||
assert.match(page, /待清理 · 将于/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user