mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-08 20:30:53 -07:00
Allow telemetry exporters to GCP to utilize user's login credentials, if requested (#13778)
This commit is contained in:
committed by
GitHub
parent
92e95ed806
commit
b9b3b8050d
@@ -13,6 +13,15 @@ import { KeypressProvider } from '../contexts/KeypressContext.js';
|
||||
import { act } from 'react';
|
||||
import { waitFor } from '../../test-utils/async.js';
|
||||
|
||||
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<typeof import('@google/gemini-cli-core')>();
|
||||
return {
|
||||
...actual,
|
||||
isEditorAvailable: () => true, // Mock to behave predictably in CI
|
||||
};
|
||||
});
|
||||
|
||||
// Mock editorSettingsManager
|
||||
vi.mock('../editors/editorSettingsManager.js', () => ({
|
||||
editorSettingsManager: {
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`EditorSettingsDialog > renders correctly 1`] = `
|
||||
│ 2. Vim These editors are currently supported. Please note │
|
||||
│ that some editors cannot be used in sandbox mode. │
|
||||
│ Apply To │
|
||||
│ ● 1. User Settings Your preferred editor is: None. │
|
||||
│ ● 1. User Settings Your preferred editor is: VS Code. │
|
||||
│ 2. Workspace Settings │
|
||||
│ │
|
||||
│ (Use Enter to select, Tab to change │
|
||||
|
||||
@@ -16,6 +16,10 @@ const mocks = vi.hoisted(() => ({
|
||||
copyFile: vi.fn(),
|
||||
homedir: vi.fn(),
|
||||
platform: vi.fn(),
|
||||
writeStream: {
|
||||
write: vi.fn(),
|
||||
on: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock('node:child_process', () => ({
|
||||
@@ -24,6 +28,7 @@ vi.mock('node:child_process', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('node:fs', () => ({
|
||||
createWriteStream: () => mocks.writeStream,
|
||||
promises: {
|
||||
mkdir: mocks.mkdir,
|
||||
readFile: mocks.readFile,
|
||||
|
||||
Reference in New Issue
Block a user