1
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const html = fs.readFileSync(path.resolve(__dirname, '..', '货代SaaS平台原型.html'), 'utf8');
|
||||
const html = fs.readFileSync(path.resolve(__dirname, '..', 'index.html'), 'utf8');
|
||||
const failures = [];
|
||||
|
||||
function expect(condition, label) {
|
||||
@@ -45,8 +45,8 @@ expect(Boolean(overview), 'missing WMS inventory overview section');
|
||||
expect(!/wms-summary-pending|>待上架<|pendingPutawayStock/.test(overview), 'WMS overview still contains pending-putaway UI');
|
||||
expect(!/待上架|pendingPutawayStock|wms-summary-pending/.test(wmsScript), 'unified WMS script still contains pending-putaway logic');
|
||||
expect(!/待上架|pendingPutawayStock/.test(detail), 'WMS detail still contains pending-putaway summary');
|
||||
expect(/min-width:2140px/.test(overview) && !/min-width:2280px/.test(overview), 'WMS table width is not 2140px');
|
||||
expect(/colspan="15"[^>]*>暂无符合条件的库存信息/.test(wmsScript), 'WMS empty row is not 15 visible columns');
|
||||
expect(/min-width:1860px/.test(overview), 'WMS table width is not 1860px');
|
||||
expect(/colspan="13"[^>]*>暂无符合条件的库存信息/.test(wmsScript), 'WMS empty row is not 13 visible columns');
|
||||
|
||||
expect(/id="page-wh-inbound"[\s\S]*?>待上架</.test(html), 'inbound pending-putaway flow was removed');
|
||||
expect(/id="page-wh-shelve"[\s\S]*?>待上架</.test(html), 'shelving pending-putaway flow was removed');
|
||||
@@ -189,7 +189,7 @@ if (behaviorSources.every(Boolean)) {
|
||||
|
||||
runtime.renderUnifiedInventory([special]);
|
||||
const inventoryMarkup = nodes.get('tbody-inventory-overview').innerHTML;
|
||||
expect((inventoryMarkup.match(/<td\b/g)||[]).length === 15, 'rendered inventory row does not contain 15 visible cells');
|
||||
expect((inventoryMarkup.match(/<td\b/g)||[]).length === 13, 'rendered inventory row does not contain 13 visible cells');
|
||||
expect(!/onclick=|decodeURIComponent|待上架/.test(inventoryMarkup), 'inventory detail link still embeds executable data or pending-putaway text');
|
||||
expect(/data-wms-action="stock-detail"/.test(inventoryMarkup), 'inventory detail link lacks delegated action data');
|
||||
expect(inventoryMarkup.includes('O'Reilly & Sons'), 'special-character owner is not safely stored in inventory link data');
|
||||
|
||||
Reference in New Issue
Block a user