Add product wordcloud board links
Build, Push and Deploy / build (push) Successful in 9s
Build, Push and Deploy / deploy (push) Successful in 24s

This commit is contained in:
2026-09-14 15:32:31 +08:00
parent 1f9eb2853c
commit 31e7053bb0
6 changed files with 111 additions and 3 deletions
+22 -3
View File
@@ -56,8 +56,8 @@ test('new product creation archives with the created product id instead of a dra
});
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');
const app = await readFile(new URL('../src/App.tsx', import.meta.url), 'utf8');
const page = await readFile(new URL('../src/pages/ProductArchivePage.tsx', import.meta.url), 'utf8');
assert.match(app, /'products'/);
assert.match(page, /产品档案/);
assert.match(page, /产品名称/);
@@ -65,9 +65,28 @@ test('app routes to product archives and list keeps IDs out of primary cells', a
});
test('product archive page exposes restore and soft delete actions', async () => {
const page = await readFile('frontend/src/pages/ProductArchivePage.tsx', 'utf8');
const page = await readFile(new URL('../src/pages/ProductArchivePage.tsx', import.meta.url), 'utf8');
assert.match(page, /恢复产品/);
assert.match(page, /软删除/);
assert.match(page, /系统信息/);
assert.match(page, /待清理 · 将于/);
});
test('product archive links use Product IDs and a configurable board origin', async () => {
const links = await readFile(new URL('../src/lib/wordcloudBoard.ts', import.meta.url), 'utf8');
const page = await readFile(new URL('../src/pages/ProductArchivePage.tsx', import.meta.url), 'utf8');
assert.match(links, /VITE_WORDCLOUD_BOARD_BASE_URL/);
assert.match(links, /http:\/\/114\.55\.99\.6:47880/);
assert.match(links, /encodeURIComponent\(productId\)/);
assert.match(links, /'cloud' \| 'screen' \| 'control'/);
assert.match(page, /product-archive-board-links/);
assert.match(page, /个人查找/);
assert.match(page, /现场大屏/);
assert.match(page, /手机控制/);
assert.match(page, /canOpenWordCloudBoard/);
assert.match(page, /disabled/);
assert.match(page, /target="_blank"/);
assert.match(page, /rel="noopener noreferrer"/);
assert.match(page, /detail\.product_id/);
});