保存同行基础版:店铺配置与员工管理
This commit is contained in:
1 parent
ecb8d6dec0
commit
b7b987064b
84 files changed
+1884
-573
No files matched your search
@@ -15,7 +15,7 @@ function harness(role='owner'){
|
||||
|
||||
test('库存页内有管理入口,助理只使用启用货盘,不能伪造管理按钮或提交',async()=>{
|
||||
const owner=harness();assert.match(owner.run('stockHeading({canReview:true})'),/管理货盘/);assert.match(owner.run('pocketManagerPanel()'),/新增货盘按自有库存管理/);
|
||||
for(const role of ['assistant','assistant2']){const h=harness(role);assert.equal(h.run('pocketManagerPanel()'),'');assert.doesNotMatch(h.run('stockHeading({canReview:false})'),/管理货盘/);assert.match(h.run('stockEntryForm()'),/value="pocket-custom"/);assert.doesNotMatch(h.run('stockEntryForm()'),/value="金料"|value="君宝汇"/);h.form('不可创建');await h.run('submitPocketManagement(__form)');await h.click('pocket-manager-status',{pocketKey:'现货',active:'false'});assert.equal(h.calls.length,0);assert.match(h.toasts.at(-1).message,/麦麦账号/);}
|
||||
for(const role of ['assistant','assistant2']){const h=harness(role);assert.equal(h.run('pocketManagerPanel()'),'');assert.doesNotMatch(h.run('stockHeading({canReview:false})'),/管理货盘/);assert.match(h.run('stockEntryForm()'),/value="pocket-custom"/);assert.doesNotMatch(h.run('stockEntryForm()'),/value="金料"|value="君宝汇"/);h.form('不可创建');await h.run('submitPocketManagement(__form)');await h.click('pocket-manager-status',{pocketKey:'现货',active:'false'});assert.equal(h.calls.length,0);assert.match(h.toasts.at(-1).message,/店主账号/);}
|
||||
});
|
||||
|
||||
test('新增和改名只发送名称与原版本,表单、流水和订单显示名映射而值仍为稳定key',async()=>{
|
||||
|
||||
Reference in new issue
Block a user