mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-12 19:10:55 -07:00
fix(ui): hide model quota in /stats and refactor quota display (#24206)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { ProgressBar } from './ProgressBar.js';
|
||||
import { renderWithProviders } from '../../test-utils/render.js';
|
||||
|
||||
describe('<ProgressBar />', () => {
|
||||
it('renders 0% correctly', async () => {
|
||||
const { lastFrame } = await renderWithProviders(
|
||||
<ProgressBar value={0} width={10} />,
|
||||
);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders 50% correctly', async () => {
|
||||
const { lastFrame } = await renderWithProviders(
|
||||
<ProgressBar value={50} width={10} />,
|
||||
);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders warning threshold correctly', async () => {
|
||||
const { lastFrame } = await renderWithProviders(
|
||||
<ProgressBar value={85} width={10} warningThreshold={80} />,
|
||||
);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders error threshold correctly at 100%', async () => {
|
||||
const { lastFrame } = await renderWithProviders(
|
||||
<ProgressBar value={100} width={10} />,
|
||||
);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user