29 lines
1.3 KiB
JavaScript
29 lines
1.3 KiB
JavaScript
const fs = require('node:fs');
|
|
const assert = require('node:assert/strict');
|
|
|
|
const moduleHtml = fs.readFileSync('prototype-src/modules/03-overseas-warehouse.html', 'utf8');
|
|
const appJs = fs.readFileSync('prototype-src/app.js', 'utf8');
|
|
|
|
assert.match(moduleHtml, /id="modal-fboo-edit"/);
|
|
assert.match(moduleHtml, /id="fboo-edit-no"/);
|
|
assert.match(moduleHtml, /id="fboo-edit-destination"/);
|
|
assert.match(moduleHtml, /id="tbody-fboo-edit-inventory"/);
|
|
assert.match(moduleHtml, /id="fboo-edit-save"/);
|
|
assert.match(moduleHtml, /@media\(max-width:600px\).*#modal-fboo-edit \.form-row/s);
|
|
|
|
assert.match(appJs, /function openFbaOutboundEdit\(/);
|
|
assert.match(appJs, /function updateFbaOutboundEditSummary\(/);
|
|
assert.match(appJs, /function saveFbaOutboundEdit\(/);
|
|
assert.match(appJs, /仅待发货出库单可编辑/);
|
|
assert.match(appJs, /fbooEditInventoryLimit/);
|
|
assert.match(appJs, /原占用量/);
|
|
assert.match(appJs, /currentFbaOutboundEditState/);
|
|
assert.match(appJs, /stockIndex:item\.index/);
|
|
assert.match(appJs, /openFbaOutboundEdit\('\$\{d\.outboundNo\}'\)/);
|
|
assert.match(appJs, /d\.status === '待发货'/);
|
|
assert.match(appJs, /warehouseStockData\[.*\]\.availQty/);
|
|
assert.match(appJs, /renderFbaOutboundOrder\(\)/);
|
|
assert.match(appJs, /editModal\.scrollTop=0/);
|
|
|
|
console.log('fba outbound edit checks passed');
|