@@ -167,7 +167,7 @@ describe("MobileExplorerPanel", () => {
167167 expect ( onSelectFile ) . toHaveBeenCalledWith ( "README.md" ) ;
168168 } ) ;
169169
170- it ( "renders shared open editor controls on mobile and closing the active row selects the next file " , ( ) => {
170+ it ( "renders shared open editor controls on mobile and closing the active row exits editor focus " , ( ) => {
171171 const onSelectFile = vi . fn ( ) ;
172172 const store = createStore ( ) ;
173173 store . set ( fileTreeAtomFamily ( "ws-test" ) , new Map ( [ [ "." , [ ] ] ] ) ) ;
@@ -227,13 +227,14 @@ describe("MobileExplorerPanel", () => {
227227 } )
228228 ) ;
229229
230- expect ( within ( section ) . getByRole ( "button" , { name : "src/beta.tsx" } ) ) . toHaveClass (
230+ expect ( within ( section ) . getByRole ( "button" , { name : "src/beta.tsx" } ) ) . not . toHaveClass (
231231 "workspace-open-editors__item--active"
232232 ) ;
233233 expect ( within ( section ) . queryByRole ( "button" , { name : "src/alpha.tsx" } ) ) . toBeNull ( ) ;
234234 expect ( heading ) . toHaveTextContent ( / ( O p e n E d i t o r s | 打 开 的 编 辑 器 ) \s * \( 1 \) / i) ;
235235 expect ( Object . keys ( store . get ( openFilesAtomFamily ( "ws-test" ) ) ) ) . toEqual ( [ "src/beta.tsx" ] ) ;
236- expect ( store . get ( activeFilePathAtomFamily ( "ws-test" ) ) ) . toBe ( "src/beta.tsx" ) ;
236+ expect ( store . get ( activeFilePathAtomFamily ( "ws-test" ) ) ) . toBeNull ( ) ;
237+ expect ( onSelectFile ) . not . toHaveBeenCalled ( ) ;
237238 } ) ;
238239
239240 it ( "renders workspace actions inside the Workspace section and wires mobile callbacks" , ( ) => {
0 commit comments