货盘管理改为紧凑列表和按需弹窗编辑
This commit is contained in:
1 parent
13382e4d49
commit
a691e56331
3 files changed
+53
-12
No files matched your search
@@ -37,7 +37,7 @@ test('新增校验空名、控制字符和40字上限,服务端重名拒绝保
|
||||
|
||||
test('管理版本冲突保留填写并禁旧数据,重新读取成功后才可再修改',async()=>{
|
||||
const h=harness();h.run('pocketManagerRows=state.pocketCatalog;');const form=h.form('用户正在改的名字',{id:'rename',dataset:{pocketKey:'现货'}});h.context.__api=async()=>{throw Object.assign(new Error('货盘已有变化'),{status:409,confirmed:true});};await h.run('submitPocketManagement(__form)');assert.equal(form.fields.name.value,'用户正在改的名字');assert.equal(h.run('pocketManagerStale'),true);assert.match(h.nodes.get('#pocket-manager-error').innerHTML,/重新读取货盘/);const calls=h.calls.length;await h.run('submitPocketManagement(__form)');assert.equal(h.calls.length,calls);
|
||||
h.context.__api=async()=>({catalog:catalog(),pockets:['现货','pocket-custom'],canManage:true});h.run('pocketManagerOpen=true;');await h.run('loadPocketManager()');assert.equal(h.run('pocketManagerStale'),false);assert.match(h.nodes.get('#pocket-manager-content').innerHTML,/value="店内现货"/);
|
||||
h.context.__api=async()=>({catalog:catalog(),pockets:['现货','pocket-custom'],canManage:true});h.run('pocketManagerOpen=true;');await h.run('loadPocketManager()');assert.equal(h.run('pocketManagerStale'),false);assert.match(h.nodes.get('#pocket-manager-content').innerHTML,/>店内现货<\/strong>/);
|
||||
});
|
||||
|
||||
test('管理写入断线保留原请求,恢复沿同操作号和内容进入货盘成功处理,不走订单记账',async()=>{
|
||||
|
||||
Reference in new issue
Block a user