diff options
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 9a712336..6a019ab6 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -864,6 +864,58 @@ describe('App UI', () => { expect(vi.mocked(Header)).not.toHaveBeenCalled(); }); + it('should display Footer component by default', async () => { + const { lastFrame, unmount } = renderWithProviders( + <App + config={mockConfig as unknown as ServerConfig} + settings={mockSettings} + version={mockVersion} + />, + ); + currentUnmount = unmount; + await Promise.resolve(); + // Footer should render - look for target directory which is always shown + expect(lastFrame()).toContain('/test/dir'); + }); + + it('should not display Footer component when hideFooter is true', async () => { + mockSettings = createMockSettings({ + user: { hideFooter: true }, + }); + + const { lastFrame, unmount } = renderWithProviders( + <App + config={mockConfig as unknown as ServerConfig} + settings={mockSettings} + version={mockVersion} + />, + ); + currentUnmount = unmount; + await Promise.resolve(); + // Footer should not render - target directory should not appear + expect(lastFrame()).not.toContain('/test/dir'); + }); + + it('should show footer if system says show, but workspace and user settings say hide', async () => { + mockSettings = createMockSettings({ + system: { hideFooter: false }, + user: { hideFooter: true }, + workspace: { hideFooter: true }, + }); + + const { lastFrame, unmount } = renderWithProviders( + <App + config={mockConfig as unknown as ServerConfig} + settings={mockSettings} + version={mockVersion} + />, + ); + currentUnmount = unmount; + await Promise.resolve(); + // Footer should render because system overrides - look for target directory + expect(lastFrame()).toContain('/test/dir'); + }); + it('should show tips if system says show, but workspace and user settings say hide', async () => { mockSettings = createMockSettings({ system: { hideTips: false }, |
