fix: 去掉其他目录的重复原型菜单 #907

Merged
renshen merged 1 commits from fix/renshen-remove-prototype-other-duplicates into main 2026-11-05 20:00:23 +08:00
2 changed files with 12 additions and 3 deletions

View File

@ -45,9 +45,6 @@ class SidebarMenu
['company-management', 'company-progress', '公司进度表', 'timeline'],
['store-management', 'change-progress', '店铺变更进度表', 'swap_horiz'],
['trademark-management', 'trademark-progress', '商标进度表', 'format_list_bulleted'],
['other', 'systemization-todos', '系统化待办', 'checklist'],
['workspace', 'tasks', '待办事项', 'assignment_turned_in'],
['workspace', 'warnings', '预警页面', 'warning_amber'],
]],
['title' => '财务报表', 'items' => [
['prototype-finance-reports', 'profit-report', '公司利润报表', 'request_quote'],

View File

@ -350,6 +350,18 @@ class NavigationTest extends FeatureTestCase
);
}
public function testPrototypeSidebarDoesNotDuplicateOtherDirectoryPages(): void
{
$prototypePages = collect(SidebarMenu::groups($this->user))
->flatMap(static fn (array $group): array => $group['items'])
->pluck('page')
->all();
$this->assertNotContains('systemization-todos', $prototypePages);
$this->assertNotContains('tasks', $prototypePages);
$this->assertNotContains('warnings', $prototypePages);
}
public function test_business_pages_render_menu_filter_and_open_page_tabs(): void
{
$this->loginAs()