mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 00:16:57 -07:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { render } from '../../../test-utils/render.js';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { SessionBrowserLoading } from './SessionBrowserLoading.js';
|
|
import { SessionBrowserError } from './SessionBrowserError.js';
|
|
import { SessionBrowserEmpty } from './SessionBrowserEmpty.js';
|
|
import type { SessionBrowserState } from '../SessionBrowser.js';
|
|
|
|
describe('SessionBrowser UI States', () => {
|
|
it('SessionBrowserLoading renders correctly', async () => {
|
|
const { lastFrame, waitUntilReady } = render(<SessionBrowserLoading />);
|
|
await waitUntilReady();
|
|
expect(lastFrame()).toMatchSnapshot();
|
|
});
|
|
|
|
it('SessionBrowserError renders correctly', async () => {
|
|
const mockState = { error: 'Test error message' } as SessionBrowserState;
|
|
const { lastFrame, waitUntilReady } = render(
|
|
<SessionBrowserError state={mockState} />,
|
|
);
|
|
await waitUntilReady();
|
|
expect(lastFrame()).toMatchSnapshot();
|
|
});
|
|
|
|
it('SessionBrowserEmpty renders correctly', async () => {
|
|
const { lastFrame, waitUntilReady } = render(<SessionBrowserEmpty />);
|
|
await waitUntilReady();
|
|
expect(lastFrame()).toMatchSnapshot();
|
|
});
|
|
});
|