mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-18 22:10:52 -07:00
Migrate core render util to use xterm.js as part of the rendering loop. (#19044)
This commit is contained in:
@@ -91,7 +91,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
);
|
||||
};
|
||||
|
||||
const { lastFrame } = renderWithProviders(
|
||||
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
|
||||
<Box height={terminalHeight}>
|
||||
<TestComponent />
|
||||
</Box>,
|
||||
@@ -100,6 +100,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
uiState: { terminalWidth },
|
||||
},
|
||||
);
|
||||
await waitUntilReady();
|
||||
|
||||
// Initial state: tool-1 should be visible
|
||||
await waitFor(() => {
|
||||
@@ -112,6 +113,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
await act(async () => {
|
||||
listRef?.scrollBy(5);
|
||||
});
|
||||
await waitUntilReady();
|
||||
|
||||
// tool-1 header should still be visible because it is sticky
|
||||
await waitFor(() => {
|
||||
@@ -130,6 +132,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
await act(async () => {
|
||||
listRef?.scrollBy(17);
|
||||
});
|
||||
await waitUntilReady();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(lastFrame()).toContain('tool-2');
|
||||
@@ -138,6 +141,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
// tool-1 should be gone now (both header and content)
|
||||
expect(lastFrame()).not.toContain('tool-1');
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('verifies that ShellToolMessage in a ToolGroupMessage in a ScrollableList has sticky headers', async () => {
|
||||
@@ -177,7 +181,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
);
|
||||
};
|
||||
|
||||
const { lastFrame } = renderWithProviders(
|
||||
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
|
||||
<Box height={terminalHeight}>
|
||||
<TestComponent />
|
||||
</Box>,
|
||||
@@ -186,6 +190,7 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
uiState: { terminalWidth },
|
||||
},
|
||||
);
|
||||
await waitUntilReady();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(lastFrame()).toContain(SHELL_COMMAND_NAME);
|
||||
@@ -196,11 +201,13 @@ describe('ToolMessage Sticky Header Regression', () => {
|
||||
await act(async () => {
|
||||
listRef?.scrollBy(5);
|
||||
});
|
||||
await waitUntilReady();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(lastFrame()).toContain(SHELL_COMMAND_NAME);
|
||||
});
|
||||
expect(lastFrame()).toContain('shell-06');
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user