diff --git a/integration-tests/context-compress-interactive.test.ts b/integration-tests/context-compress-interactive.test.ts index c7e04c6c23..fbe2359aa2 100644 --- a/integration-tests/context-compress-interactive.test.ts +++ b/integration-tests/context-compress-interactive.test.ts @@ -8,7 +8,16 @@ import { expect, describe, it, beforeEach, afterEach } from 'vitest'; import { TestRig } from './test-helper.js'; import { join } from 'node:path'; -describe('Interactive Mode', () => { +// Skip on macOS: every interactive test in this file is chronically flaky +// because the captured pty buffer contains the CLI's startup escape +// sequences (`q4;?m...true color warning`) instead of the streamed output, +// causing `expectText(...)` to time out. Reproducible across unrelated +// runs on `main` (24740161950, 24739323404) and on consecutive merge-queue +// gates for #25753 (24743605639, 24747624513) — different tests in the +// same describe fail on different runs. Not specific to any model. +const skipOnDarwin = process.platform === 'darwin'; + +describe.skipIf(skipOnDarwin)('Interactive Mode', () => { let rig: TestRig; beforeEach(() => { diff --git a/integration-tests/file-system.test.ts b/integration-tests/file-system.test.ts index 80552cfd68..aa50000ef6 100644 --- a/integration-tests/file-system.test.ts +++ b/integration-tests/file-system.test.ts @@ -134,7 +134,9 @@ describe('file-system', () => { ).toBeTruthy(); const newFileContent = rig.readFile(fileName); - expect(newFileContent).toBe('hello'); + // Trim to tolerate models that idiomatically append a trailing newline. + // This test is about path-with-spaces handling, not whitespace fidelity. + expect(newFileContent.trim()).toBe('hello'); }); it('should perform a read-then-write sequence', async () => { diff --git a/integration-tests/plan-mode.test.ts b/integration-tests/plan-mode.test.ts index 6f90c60fec..41de123cf7 100644 --- a/integration-tests/plan-mode.test.ts +++ b/integration-tests/plan-mode.test.ts @@ -81,7 +81,10 @@ describe('Plan Mode', () => { await rig.run({ approvalMode: 'plan', - args: 'Create a file called plan.md in the plans directory.', + args: + 'Create a file called plan.md in the plans directory with the ' + + 'content "# Plan". Treat this as a Directive and write the file ' + + 'immediately without proposing strategy or asking for confirmation.', }); const toolLogs = rig.readToolLogs(); @@ -194,7 +197,11 @@ describe('Plan Mode', () => { await rig.run({ approvalMode: 'plan', - args: 'Create a file called plan-no-session.md in the plans directory.', + args: + 'Create a file called plan-no-session.md in the plans directory ' + + 'with the content "# Plan". Treat this as a Directive and write ' + + 'the file immediately without proposing strategy or asking for ' + + 'confirmation.', }); const toolLogs = rig.readToolLogs(); diff --git a/packages/test-utils/src/test-rig.ts b/packages/test-utils/src/test-rig.ts index 9374b573ac..f057ba9407 100644 --- a/packages/test-utils/src/test-rig.ts +++ b/packages/test-utils/src/test-rig.ts @@ -11,7 +11,10 @@ import { join, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import { env } from 'node:process'; import { setTimeout as sleep } from 'node:timers/promises'; -import { PREVIEW_GEMINI_MODEL, GEMINI_DIR } from '@google/gemini-cli-core'; +import { + PREVIEW_GEMINI_FLASH_MODEL, + GEMINI_DIR, +} from '@google/gemini-cli-core'; export { GEMINI_DIR }; import * as pty from '@lydell/node-pty'; import stripAnsi from 'strip-ansi'; @@ -475,7 +478,7 @@ export class TestRig { ...(env['GEMINI_TEST_TYPE'] === 'integration' ? { model: { - name: PREVIEW_GEMINI_MODEL, + name: PREVIEW_GEMINI_FLASH_MODEL, }, } : {}),