Migrate core render util to use xterm.js as part of the rendering loop. (#19044)

This commit is contained in:
Jacob Richman
2026-02-18 16:46:50 -08:00
committed by GitHub
parent 04c52513e7
commit 04f65f3d55
213 changed files with 7065 additions and 3852 deletions
@@ -24,8 +24,11 @@ describe('AboutBox', () => {
ideClient: '',
};
it('renders with required props', () => {
const { lastFrame } = renderWithProviders(<AboutBox {...defaultProps} />);
it('renders with required props', async () => {
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<AboutBox {...defaultProps} />,
);
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('About Gemini CLI');
expect(output).toContain('1.0.0');
@@ -34,31 +37,44 @@ describe('AboutBox', () => {
expect(output).toContain('default');
expect(output).toContain('macOS');
expect(output).toContain('Logged in with Google');
unmount();
});
it.each([
['gcpProject', 'my-project', 'GCP Project'],
['ideClient', 'vscode', 'IDE Client'],
['tier', 'Enterprise', 'Tier'],
])('renders optional prop %s', (prop, value, label) => {
])('renders optional prop %s', async (prop, value, label) => {
const props = { ...defaultProps, [prop]: value };
const { lastFrame } = renderWithProviders(<AboutBox {...props} />);
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<AboutBox {...props} />,
);
await waitUntilReady();
const output = lastFrame();
expect(output).toContain(label);
expect(output).toContain(value);
unmount();
});
it('renders Auth Method with email when userEmail is provided', () => {
it('renders Auth Method with email when userEmail is provided', async () => {
const props = { ...defaultProps, userEmail: 'test@example.com' };
const { lastFrame } = renderWithProviders(<AboutBox {...props} />);
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<AboutBox {...props} />,
);
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('Logged in with Google (test@example.com)');
unmount();
});
it('renders Auth Method correctly when not oauth', () => {
it('renders Auth Method correctly when not oauth', async () => {
const props = { ...defaultProps, selectedAuthType: 'api-key' };
const { lastFrame } = renderWithProviders(<AboutBox {...props} />);
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<AboutBox {...props} />,
);
await waitUntilReady();
const output = lastFrame();
expect(output).toContain('api-key');
unmount();
});
});