mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-17 08:41:19 -07:00
Migrate core render util to use xterm.js as part of the rendering loop. (#19044)
This commit is contained in:
@@ -2064,7 +2064,7 @@ describe('InputPrompt', () => {
|
||||
);
|
||||
await waitFor(() => {
|
||||
const frame = stdout.lastFrame();
|
||||
const lines = frame!.split('\n');
|
||||
const lines = frame.split('\n');
|
||||
// The line with the cursor should just be an inverted space inside the box border
|
||||
expect(
|
||||
lines.find((l) => l.includes(chalk.inverse(' '))),
|
||||
@@ -2101,7 +2101,7 @@ describe('InputPrompt', () => {
|
||||
expect(frame).toContain('hello');
|
||||
expect(frame).toContain(`world${chalk.inverse(' ')}`);
|
||||
|
||||
const outputLines = frame!.split('\n');
|
||||
const outputLines = frame.trim().split('\n');
|
||||
// The number of lines should be 2 for the border plus 3 for the content.
|
||||
expect(outputLines.length).toBe(5);
|
||||
});
|
||||
@@ -3349,7 +3349,7 @@ describe('InputPrompt', () => {
|
||||
return <InputPrompt {...baseProps} buffer={buffer as TextBuffer} />;
|
||||
};
|
||||
|
||||
const { stdin, stdout, unmount, simulateClick } = renderWithProviders(
|
||||
const { stdout, unmount, simulateClick } = renderWithProviders(
|
||||
<TestWrapper />,
|
||||
{
|
||||
mouseEventsEnabled: true,
|
||||
@@ -3364,8 +3364,8 @@ describe('InputPrompt', () => {
|
||||
});
|
||||
|
||||
// Simulate double-click to expand
|
||||
await simulateClick(stdin, 5, 2);
|
||||
await simulateClick(stdin, 5, 2);
|
||||
await simulateClick(5, 2);
|
||||
await simulateClick(5, 2);
|
||||
|
||||
// 2. Verify expanded content is visible
|
||||
await waitFor(() => {
|
||||
@@ -3373,8 +3373,8 @@ describe('InputPrompt', () => {
|
||||
});
|
||||
|
||||
// Simulate double-click to collapse
|
||||
await simulateClick(stdin, 5, 2);
|
||||
await simulateClick(stdin, 5, 2);
|
||||
await simulateClick(5, 2);
|
||||
await simulateClick(5, 2);
|
||||
|
||||
// 3. Verify placeholder is restored
|
||||
await waitFor(() => {
|
||||
@@ -3440,7 +3440,7 @@ describe('InputPrompt', () => {
|
||||
return <InputPrompt {...baseProps} buffer={buffer as TextBuffer} />;
|
||||
};
|
||||
|
||||
const { stdin, stdout, unmount, simulateClick } = renderWithProviders(
|
||||
const { stdout, unmount, simulateClick } = renderWithProviders(
|
||||
<TestWrapper />,
|
||||
{
|
||||
mouseEventsEnabled: true,
|
||||
@@ -3455,8 +3455,8 @@ describe('InputPrompt', () => {
|
||||
});
|
||||
|
||||
// Simulate double-click WAY to the right on the first line
|
||||
await simulateClick(stdin, 100, 2);
|
||||
await simulateClick(stdin, 100, 2);
|
||||
await simulateClick(90, 2);
|
||||
await simulateClick(90, 2);
|
||||
|
||||
// Verify it is NOW collapsed
|
||||
await waitFor(() => {
|
||||
|
||||
Reference in New Issue
Block a user