mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
Migrate core render util to use xterm.js as part of the rendering loop. (#19044)
This commit is contained in:
@@ -101,32 +101,38 @@ describe('<DefaultAppLayout />', () => {
|
||||
mockUIState.streamingState = StreamingState.Idle;
|
||||
});
|
||||
|
||||
it('renders BackgroundShellDisplay when shells exist and active', () => {
|
||||
it('renders BackgroundShellDisplay when shells exist and active', async () => {
|
||||
mockUIState.backgroundShells.set(123, createMockShell(123));
|
||||
mockUIState.activeBackgroundShellPid = 123;
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
|
||||
const { lastFrame } = render(<DefaultAppLayout />);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('hides BackgroundShellDisplay when StreamingState is WaitingForConfirmation', () => {
|
||||
it('hides BackgroundShellDisplay when StreamingState is WaitingForConfirmation', async () => {
|
||||
mockUIState.backgroundShells.set(123, createMockShell(123));
|
||||
mockUIState.activeBackgroundShellPid = 123;
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
mockUIState.streamingState = StreamingState.WaitingForConfirmation;
|
||||
|
||||
const { lastFrame } = render(<DefaultAppLayout />);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('shows BackgroundShellDisplay when StreamingState is NOT WaitingForConfirmation', () => {
|
||||
it('shows BackgroundShellDisplay when StreamingState is NOT WaitingForConfirmation', async () => {
|
||||
mockUIState.backgroundShells.set(123, createMockShell(123));
|
||||
mockUIState.activeBackgroundShellPid = 123;
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
mockUIState.streamingState = StreamingState.Responding;
|
||||
|
||||
const { lastFrame } = render(<DefaultAppLayout />);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,8 @@ exports[`<DefaultAppLayout /> > hides BackgroundShellDisplay when StreamingState
|
||||
Notifications
|
||||
CopyModeWarning
|
||||
Composer
|
||||
ExitWarning"
|
||||
ExitWarning
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`<DefaultAppLayout /> > renders BackgroundShellDisplay when shells exist and active 1`] = `
|
||||
@@ -18,7 +19,8 @@ BackgroundShellDisplay
|
||||
Notifications
|
||||
CopyModeWarning
|
||||
Composer
|
||||
ExitWarning"
|
||||
ExitWarning
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`<DefaultAppLayout /> > shows BackgroundShellDisplay when StreamingState is NOT WaitingForConfirmation 1`] = `
|
||||
@@ -31,5 +33,6 @@ BackgroundShellDisplay
|
||||
Notifications
|
||||
CopyModeWarning
|
||||
Composer
|
||||
ExitWarning"
|
||||
ExitWarning
|
||||
"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user