@@ -4,17 +4,16 @@ import {
44 SETTINGS_NAVIGATION_ROUTES ,
55 SIDEBAR_SECTIONS ,
66 isSettingsNavigationRoute ,
7- isRouteInSidebarSection ,
87} from "./app-navigation.ts" ;
98import { routeIdFromPath } from "./app-routes.ts" ;
109
1110describe ( "SIDEBAR_SECTIONS" , ( ) => {
12- it ( "collapses detailed settings slices into one sidebar entry" , ( ) => {
13- const settings = SIDEBAR_SECTIONS . find ( ( group ) => group . label === "settings" ) ;
14- expect ( settings ?. routes ) . toEqual ( [ "config" ] ) ;
11+ it ( "keeps settings out of the scrollable sections; the footer pins it" , ( ) => {
12+ expect ( SIDEBAR_SECTIONS . flatMap ( ( group ) => group . routes ) ) . not . toContain ( "config" ) ;
1513 expect ( SETTINGS_NAVIGATION_ROUTES . every ( ( routeId ) => isSettingsNavigationRoute ( routeId ) ) ) . toBe (
1614 true ,
1715 ) ;
16+ expect ( isSettingsNavigationRoute ( "chat" ) ) . toBe ( false ) ;
1817 } ) ;
1918
2019 it ( "keeps channel management out of the primary control sidebar" , ( ) => {
@@ -31,18 +30,6 @@ describe("SIDEBAR_SECTIONS", () => {
3130 expect ( SETTINGS_NAVIGATION_ROUTES ) . toContain ( "channels" ) ;
3231 } ) ;
3332
34- it ( "keeps the settings group active for nested settings routes" , ( ) => {
35- const settings = SIDEBAR_SECTIONS . find ( ( group ) => group . label === "settings" ) ;
36- if ( ! settings ) {
37- throw new Error ( "Expected settings group" ) ;
38- }
39-
40- expect ( isRouteInSidebarSection ( settings , "appearance" ) ) . toBe ( true ) ;
41- expect ( isRouteInSidebarSection ( settings , "channels" ) ) . toBe ( true ) ;
42- expect ( isRouteInSidebarSection ( settings , "debug" ) ) . toBe ( true ) ;
43- expect ( isRouteInSidebarSection ( settings , "chat" ) ) . toBe ( false ) ;
44- } ) ;
45-
4633 it ( "routes every published settings slice" , ( ) => {
4734 expect ( routeIdFromPath ( "/communications" ) ) . toBe ( "communications" ) ;
4835 expect ( routeIdFromPath ( "/appearance" ) ) . toBe ( "appearance" ) ;
0 commit comments