| ... | @@ -338,12 +338,12 @@ describe("rightPanelStore", () => { | ... | @@ -338,12 +338,12 @@ describe("rightPanelStore", () => { |
| 338 | }); | 338 | }); |
| 339 | }); | 339 | }); |
| 340 | | 340 | |
| 341 | it("closing the final terminal pane removes its surface but keeps the panel open", () => { | 341 | it("closing the final terminal pane removes its surface and closes the panel", () => { |
| 342 | useRightPanelStore.getState().openTerminal(refA, "term-1"); | 342 | useRightPanelStore.getState().openTerminal(refA, "term-1"); |
| 343 | useRightPanelStore.getState().closeTerminal(refA, "terminal:term-1", "term-1"); | 343 | useRightPanelStore.getState().closeTerminal(refA, "terminal:term-1", "term-1"); |
| 344 | | 344 | |
| 345 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ | 345 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ |
| 346 | isOpen: true, | 346 | isOpen: false, |
| 347 | activeSurfaceId: null, | 347 | activeSurfaceId: null, |
| 348 | surfaces: [], | 348 | surfaces: [], |
| 349 | }); | 349 | }); |
| ... | @@ -359,12 +359,12 @@ describe("rightPanelStore", () => { | ... | @@ -359,12 +359,12 @@ describe("rightPanelStore", () => { |
| 359 | ); | 359 | ); |
| 360 | }); | 360 | }); |
| 361 | | 361 | |
| 362 | it("closing the final surface leaves the panel open and empty", () => { | 362 | it("closing the final surface closes the panel", () => { |
| 363 | useRightPanelStore.getState().openTerminal(refA, "term-1"); | 363 | useRightPanelStore.getState().openTerminal(refA, "term-1"); |
| 364 | useRightPanelStore.getState().closeSurface(refA, "terminal:term-1"); | 364 | useRightPanelStore.getState().closeSurface(refA, "terminal:term-1"); |
| 365 | | 365 | |
| 366 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ | 366 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ |
| 367 | isOpen: true, | 367 | isOpen: false, |
| 368 | activeSurfaceId: null, | 368 | activeSurfaceId: null, |
| 369 | surfaces: [], | 369 | surfaces: [], |
| 370 | }); | 370 | }); |
| ... | @@ -406,14 +406,14 @@ describe("rightPanelStore", () => { | ... | @@ -406,14 +406,14 @@ describe("rightPanelStore", () => { |
| 406 | }); | 406 | }); |
| 407 | }); | 407 | }); |
| 408 | | 408 | |
| 409 | it("closing all surfaces leaves the panel open and empty", () => { | 409 | it("closing all surfaces closes the panel", () => { |
| 410 | useRightPanelStore.getState().openBrowser(refA, "tab-a"); | 410 | useRightPanelStore.getState().openBrowser(refA, "tab-a"); |
| 411 | useRightPanelStore.getState().openFile(refA, "src/index.ts"); | 411 | useRightPanelStore.getState().openFile(refA, "src/index.ts"); |
| 412 | | 412 | |
| 413 | useRightPanelStore.getState().closeAllSurfaces(refA); | 413 | useRightPanelStore.getState().closeAllSurfaces(refA); |
| 414 | | 414 | |
| 415 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ | 415 | expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ |
| 416 | isOpen: true, | 416 | isOpen: false, |
| 417 | activeSurfaceId: null, | 417 | activeSurfaceId: null, |
| 418 | surfaces: [], | 418 | surfaces: [], |
| 419 | }); | 419 | }); |