mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-02-01 22:48:03 +00:00
fix(infra) - Use canned response for flicker test (#12377)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
3
integration-tests/flicker-detector.max-height.responses
Normal file
3
integration-tests/flicker-detector.max-height.responses
Normal file
File diff suppressed because one or more lines are too long
@@ -6,26 +6,34 @@
|
|||||||
|
|
||||||
import { describe, it, expect } from 'vitest';
|
import { describe, it, expect } from 'vitest';
|
||||||
import { TestRig } from './test-helper.js';
|
import { TestRig } from './test-helper.js';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
describe('Flicker Detector', () => {
|
describe('Flicker Detector', () => {
|
||||||
// TODO: https://github.com/google-gemini/gemini-cli/issues/11170
|
it('should not detect a flicker under the max height budget', async () => {
|
||||||
it.skip('should not detect a flicker under the max height budget', async () => {
|
|
||||||
const rig = new TestRig();
|
const rig = new TestRig();
|
||||||
await rig.setup('flicker-detector-test');
|
rig.setup('flicker-detector-test', {
|
||||||
|
fakeResponsesPath: join(
|
||||||
|
import.meta.dirname,
|
||||||
|
'flicker-detector.max-height.responses',
|
||||||
|
),
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const run = await rig.runInteractive();
|
||||||
|
const prompt = 'Tell me a fun fact.';
|
||||||
|
await run.type(prompt);
|
||||||
|
await run.type('\r');
|
||||||
|
|
||||||
const run = await rig.runInteractive();
|
const hasUserPromptEvent = await rig.waitForTelemetryEvent('user_prompt');
|
||||||
const prompt = 'Tell me a fun fact.';
|
expect(hasUserPromptEvent).toBe(true);
|
||||||
await run.type(prompt);
|
|
||||||
await run.type('\r');
|
|
||||||
|
|
||||||
const hasUserPromptEvent = await rig.waitForTelemetryEvent('user_prompt');
|
const hasSessionCountMetric = await rig.waitForMetric('session.count');
|
||||||
expect(hasUserPromptEvent).toBe(true);
|
expect(hasSessionCountMetric).toBe(true);
|
||||||
|
|
||||||
const hasSessionCountMetric = await rig.waitForMetric('session.count');
|
// We expect NO flicker event to be found.
|
||||||
expect(hasSessionCountMetric).toBe(true);
|
const flickerMetric = rig.readMetric('ui.flicker.count');
|
||||||
|
expect(flickerMetric).toBeNull();
|
||||||
// We expect NO flicker event to be found.
|
} finally {
|
||||||
const flickerMetric = rig.readMetric('ui.flicker.count');
|
await rig.cleanup();
|
||||||
expect(flickerMetric).toBeNull();
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user