From 04518b52c0ddcd5ae1192763c55e472add218b3c Mon Sep 17 00:00:00 2001
From: matt korwel <matt.korwel@gmail.com>
Date: Thu, 19 Jun 2025 16:52:22 -0700
Subject: Auth First Run (#1207)

Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
---
 packages/cli/src/ui/App.test.tsx | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

(limited to 'packages/cli/src/ui/App.test.tsx')

diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx
index 0ebaa34d..dca24b5c 100644
--- a/packages/cli/src/ui/App.test.tsx
+++ b/packages/cli/src/ui/App.test.tsx
@@ -145,6 +145,15 @@ vi.mock('./hooks/useGeminiStream', () => ({
   })),
 }));
 
+vi.mock('./hooks/useAuthCommand', () => ({
+  useAuthCommand: vi.fn(() => ({
+    isAuthDialogOpen: false,
+    openAuthDialog: vi.fn(),
+    handleAuthSelect: vi.fn(),
+    handleAuthHighlight: vi.fn(),
+  })),
+}));
+
 vi.mock('./hooks/useLogger', () => ({
   useLogger: vi.fn(() => ({
     getPreviousUserMessages: vi.fn().mockResolvedValue([]),
@@ -176,7 +185,9 @@ describe('App UI', () => {
     };
     const workspaceSettingsFile: SettingsFile = {
       path: '/workspace/.gemini/settings.json',
-      settings,
+      settings: {
+        ...settings,
+      },
     };
     return new LoadedSettings(userSettingsFile, workspaceSettingsFile, []);
   };
@@ -184,10 +195,6 @@ describe('App UI', () => {
   beforeEach(() => {
     const ServerConfigMocked = vi.mocked(ServerConfig, true);
     mockConfig = new ServerConfigMocked({
-      contentGeneratorConfig: {
-        apiKey: 'test-key',
-        model: 'test-model',
-      },
       embeddingModel: 'test-embedding-model',
       sandbox: undefined,
       targetDir: '/test/dir',
@@ -197,7 +204,7 @@ describe('App UI', () => {
       showMemoryUsage: false,
       sessionId: 'test-session-id',
       cwd: '/tmp',
-      // Provide other required fields for ConfigParameters if necessary
+      model: 'model',
     }) as unknown as MockServerConfig;
 
     // Ensure the getShowMemoryUsage mock function is specifically set up if not covered by constructor mock
-- 
cgit v1.2.3

