@@ -126,16 +126,20 @@ it("re-enables Save when a When editor closes on an expression it could not pars
126126 await expect . element ( screen . getByRole ( "button" , { name : "Save" } ) ) . toBeEnabled ( ) ;
127127} ) ;
128128
129- it ( "filters actions and keeps assigned commands disabled with their shortcuts " , async ( ) => {
129+ it ( "filters actions and allows additional shortcuts for assigned commands " , async ( ) => {
130130 await using screen = await render ( < KeybindingsSettingsPanel /> ) ;
131131 await screen . getByRole ( "button" , { name : "Add keybinding" } ) . click ( ) ;
132132 const search = screen . getByRole ( "combobox" , { name : "Search actions" } ) ;
133133 await expect . element ( search ) . toHaveFocus ( ) ;
134134 await userEvent . keyboard ( "sidebar.toggle" ) ;
135135 const assigned = screen . getByRole ( "option" , { name : / S i d e b a r : T o g g l e / } ) ;
136- await expect . element ( assigned ) . toHaveAttribute ( "aria-disabled" , "true" ) ;
136+ await expect . element ( assigned ) . not . toHaveAttribute ( "aria-disabled" , "true" ) ;
137137 await expect . element ( assigned . element ( ) . querySelector ( "kbd" ) ! ) . toBeVisible ( ) ;
138138 expect ( screen . getByRole ( "option" ) . elements ( ) ) . toHaveLength ( 1 ) ;
139+ await assigned . click ( ) ;
140+ const command = screen . getByRole ( "combobox" , { name : "Command" , exact : true } ) ;
141+ await expect . element ( command ) . toHaveTextContent ( "Sidebar: Toggle" ) ;
142+ await command . click ( ) ;
139143 await search . fill ( "no-such-action" ) ;
140144 await expect . element ( screen . getByText ( "No actions found." ) ) . toBeVisible ( ) ;
141145 await search . fill ( "composer.cycleHost" ) ;
0 commit comments