fix: keep orders and batches as independent navigation entries
This commit is contained in:
1 parent
d46370df92
commit
d03a4ccd9d
9 files changed
+32
-12
No files matched your search
@@ -11,11 +11,11 @@ test('compact navigation groups settings, retains deep links and role boundaries
|
||||
await page.goto(base+'/#system-settings');await page.getByLabel('账号',{exact:true}).fill(role);await page.getByLabel('密码',{exact:true}).fill(password);await page.getByRole('button',{name:'登录',exact:true}).click();
|
||||
await page.getByRole('heading',{name:'BPM 连接',exact:true}).first().waitFor();assert.equal(await page.locator('#sidebar-menu [data-view]').count(),7);
|
||||
assert.equal(await page.locator('#settings-tabs a[href="#users"]').count(),role==='admin'?1:0);
|
||||
await page.getByRole('link',{name:'邮件批次',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#schedule-form').waitFor();
|
||||
assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#notification-batches');
|
||||
await page.getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#schedule-form').waitFor();
|
||||
assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#business-settings');
|
||||
await page.getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('heading',{name:'分类通知规则',exact:true}).waitFor();
|
||||
await page.goto(base+'/#users');await page.getByRole('heading',{name:role==='admin'?'团队账号':'业务首页',exact:true}).first().waitFor();
|
||||
await page.goto(base+'/#calendar');await page.getByRole('heading',{name:'业务日历',exact:true}).waitFor();assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#notification-batches');
|
||||
await page.goto(base+'/#calendar');await page.getByRole('heading',{name:'业务日历',exact:true}).waitFor();assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#business-settings');
|
||||
await page.goto(base+'/#system-settings');await page.setViewportSize({width:390,height:844});await page.getByRole('button',{name:'展开菜单',exact:true}).click();
|
||||
await page.locator('#sidebar-menu').getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('heading',{name:'分类通知规则',exact:true}).waitFor();
|
||||
await page.waitForFunction(()=>!document.querySelector('#sidebar-menu').classList.contains('collapsing'));assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);assert.equal(await page.locator('#sidebar-menu').evaluate(el=>el.classList.contains('show')),false);assert.equal(await page.getByRole('button',{name:'展开菜单',exact:true}).getAttribute('aria-expanded'),'false');
|
||||
|
||||
Reference in new issue
Block a user