diff options
| author | Jacob Richman <[email protected]> | 2025-07-25 17:36:19 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-26 00:36:19 +0000 |
| commit | b089845f1c34e5475bcae9cc8eb42fba8be9adc4 (patch) | |
| tree | 04c74632fefb91f954a8aded97427d2d1ff5500b /packages/cli/src/ui/App.test.tsx | |
| parent | 21fef1620d78f07af01a75b8bbbeeb15798e73ef (diff) | |
fix(ui): remove extraneous whitespace from startup screen (#3990)
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 4abf2d06..93230d1c 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -657,6 +657,38 @@ describe('App UI', () => { }); }); + it('should render the initial UI correctly', () => { + const { lastFrame, unmount } = render( + <App + config={mockConfig as unknown as ServerConfig} + settings={mockSettings} + version={mockVersion} + />, + ); + currentUnmount = unmount; + expect(lastFrame()).toMatchSnapshot(); + }); + + it('should render correctly with the prompt input box', () => { + vi.mocked(useGeminiStream).mockReturnValue({ + streamingState: StreamingState.Idle, + submitQuery: vi.fn(), + initError: null, + pendingHistoryItems: [], + thought: null, + }); + + const { lastFrame, unmount } = render( + <App + config={mockConfig as unknown as ServerConfig} + settings={mockSettings} + version={mockVersion} + />, + ); + currentUnmount = unmount; + expect(lastFrame()).toMatchSnapshot(); + }); + describe('with initial prompt from --prompt-interactive', () => { it('should submit the initial prompt automatically', async () => { const mockSubmitQuery = vi.fn(); |
