test(cli): stabilize integration tests and update snapshots after rebase

This commit is contained in:
Keith Guerin
2026-03-24 21:10:59 -07:00
parent 5062f459c5
commit 292d2924d0
4 changed files with 1 additions and 298 deletions
@@ -36,6 +36,7 @@ describe('AuthInProgress', () => {
afterEach(() => {
vi.useRealTimers();
vi.clearAllMocks();
});
it('renders initial state with spinner', async () => {
@@ -11,17 +11,6 @@ Enter to submit · Esc to cancel
"
`;
exports[`AskUserDialog > Choice question placeholder > uses default placeholder when not provided 2`] = `
"Select your preferred language:
1. TypeScript
2. JavaScript
● 3. Enter a custom value
Enter to submit · Esc to cancel
"
`;
exports[`AskUserDialog > Choice question placeholder > uses placeholder for "Other" option when provided 1`] = `
"Select your preferred language:
@@ -33,17 +22,6 @@ Enter to submit · Esc to cancel
"
`;
exports[`AskUserDialog > Choice question placeholder > uses placeholder for "Other" option when provided 2`] = `
"Select your preferred language:
1. TypeScript
2. JavaScript
● 3. Type another language...
Enter to submit · Esc to cancel
"
`;
exports[`AskUserDialog > Scroll Arrows (useAlternateBuffer: false) > shows scroll arrows correctly when useAlternateBuffer is false 1`] = `
"Choose an option
@@ -60,22 +38,6 @@ Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
exports[`AskUserDialog > Scroll Arrows (useAlternateBuffer: false) > shows scroll arrows correctly when useAlternateBuffer is false 2`] = `
"Choose an option
● 1. Option 1
Description 1
2. Option 2
Description 2
3. Option 3
Description 3
Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
exports[`AskUserDialog > Scroll Arrows (useAlternateBuffer: true) > shows scroll arrows correctly when useAlternateBuffer is true 1`] = `
"Choose an option
@@ -92,22 +54,6 @@ Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
exports[`AskUserDialog > Scroll Arrows (useAlternateBuffer: true) > shows scroll arrows correctly when useAlternateBuffer is true 2`] = `
"Choose an option
● 1. Option 1
Description 1
2. Option 2
Description 2
3. Option 3
Description 3
Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
exports[`AskUserDialog > Text type questions > renders text input for type: "text" 1`] = `
"What should we name this component?
@@ -250,19 +196,3 @@ exports[`AskUserDialog > verifies "All of the above" visual state with snapshot
Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
exports[`AskUserDialog > verifies "All of the above" visual state with snapshot 2`] = `
"Which features?
(Select all that apply)
1. [x] TypeScript
2. [x] ESLint
● 3. [x] All of the above
Select all options
4. [ ] Enter a custom value
Done
Finish selection
Enter to select · ↑/↓ to navigate · Esc to cancel
"
`;
@@ -27,33 +27,6 @@ Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: false > bubbles up Ctrl+C when feedback is empty while editing 2`] = `
"Overview
Add user authentication to the CLI application.
Implementation Steps
1. Create src/auth/AuthService.ts with login/logout methods
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
2. Yes, manually accept edits
Approves plan but requires confirmation for each tool
● 3. Type your feedback...
Enter to submit · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: false > calls onFeedback when feedback is typed and submitted 1`] = `
"Overview
@@ -81,33 +54,6 @@ Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: false > calls onFeedback when feedback is typed and submitted 2`] = `
"Overview
Add user authentication to the CLI application.
Implementation Steps
1. Create src/auth/AuthService.ts with login/logout methods
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
2. Yes, manually accept edits
Approves plan but requires confirmation for each tool
● 3. Add tests
Enter to submit · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: false > displays error state when file read fails 1`] = `
" Error reading plan: File not found
"
@@ -194,33 +140,6 @@ Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: true > bubbles up Ctrl+C when feedback is empty while editing 2`] = `
"Overview
Add user authentication to the CLI application.
Implementation Steps
1. Create src/auth/AuthService.ts with login/logout methods
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
2. Yes, manually accept edits
Approves plan but requires confirmation for each tool
● 3. Type your feedback...
Enter to submit · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: true > calls onFeedback when feedback is typed and submitted 1`] = `
"Overview
@@ -248,33 +167,6 @@ Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: true > calls onFeedback when feedback is typed and submitted 2`] = `
"Overview
Add user authentication to the CLI application.
Implementation Steps
1. Create src/auth/AuthService.ts with login/logout methods
2. Add session storage in src/storage/SessionStore.ts
3. Update src/commands/index.ts to check auth status
4. Add tests in src/auth/__tests__/
Files to Modify
- src/index.ts - Add auth middleware
- src/config.ts - Add auth configuration options
1. Yes, automatically accept edits
Approves plan and allows tools to run automatically
2. Yes, manually accept edits
Approves plan but requires confirmation for each tool
● 3. Add tests
Enter to submit · Ctrl+X to edit plan · Esc to cancel
"
`;
exports[`ExitPlanModeDialog > useAlternateBuffer: true > displays error state when file read fails 1`] = `
" Error reading plan: File not found
"
@@ -78,126 +78,6 @@ exports[`InputPrompt > mouse interaction > should toggle paste expansion on doub
"
`;
exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 4`] = `
"
ERROR [vitest] No "isITerm2" export is defined on the "../utils/terminalUtils.js" mock. Did you
forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
- If you need to partially mock a module, you can use "importOriginal" helper inside:\\t
- \\t
-VitestMocker.create
rror (file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/no
de_modules/vitest/dist/chunks/execute.B7h3T_Hc.js:284:17)
-Object.ge
(file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules
/vitest/dist/chunks/execute.B7h3T_Hc.js:330:16)
- HalfLinePaddedBoxInternal (src/ui/components/shared/HalfLinePaddedBox.tsx:82:19)
-Object.react-stack-bott
m-frame (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_
modules/react-reconciler/cjs/react-reconciler.development.js:15859:20)
-renderWithHoo
s (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/re
act-reconciler/cjs/react-reconciler.development.js:3221:22)
-updateFunctionComp
nent (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modul
es/react-reconciler/cjs/react-reconciler.development.js:6475:19)
-beginWor
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/react-r
econciler/cjs/react-reconciler.development.js:8009:18)
-runWithFiberIn
EV (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:1738:13)
-performUnitOfW
rk (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:12834:22)
-workLoopSyn
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/reac
t-reconciler/cjs/react-reconciler.development.js:12644:41)
"
`;
exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 5`] = `
"
ERROR [vitest] No "isITerm2" export is defined on the "../utils/terminalUtils.js" mock. Did you
forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
- If you need to partially mock a module, you can use "importOriginal" helper inside:\\t
- \\t
-VitestMocker.create
rror (file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/no
de_modules/vitest/dist/chunks/execute.B7h3T_Hc.js:284:17)
-Object.ge
(file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules
/vitest/dist/chunks/execute.B7h3T_Hc.js:330:16)
- HalfLinePaddedBoxInternal (src/ui/components/shared/HalfLinePaddedBox.tsx:82:19)
-Object.react-stack-bott
m-frame (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_
modules/react-reconciler/cjs/react-reconciler.development.js:15859:20)
-renderWithHoo
s (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/re
act-reconciler/cjs/react-reconciler.development.js:3221:22)
-updateFunctionComp
nent (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modul
es/react-reconciler/cjs/react-reconciler.development.js:6475:19)
-beginWor
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/react-r
econciler/cjs/react-reconciler.development.js:8009:18)
-runWithFiberIn
EV (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:1738:13)
-performUnitOfW
rk (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:12834:22)
-workLoopSyn
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/reac
t-reconciler/cjs/react-reconciler.development.js:12644:41)
"
`;
exports[`InputPrompt > mouse interaction > should toggle paste expansion on double-click 6`] = `
"
ERROR [vitest] No "isITerm2" export is defined on the "../utils/terminalUtils.js" mock. Did you
forget to return it from "vi.mock"?
If you need to partially mock a module, you can use "importOriginal" helper inside:
- If you need to partially mock a module, you can use "importOriginal" helper inside:\\t
- \\t
-VitestMocker.create
rror (file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/no
de_modules/vitest/dist/chunks/execute.B7h3T_Hc.js:284:17)
-Object.ge
(file:///Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules
/vitest/dist/chunks/execute.B7h3T_Hc.js:330:16)
- HalfLinePaddedBoxInternal (src/ui/components/shared/HalfLinePaddedBox.tsx:82:19)
-Object.react-stack-bott
m-frame (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_
modules/react-reconciler/cjs/react-reconciler.development.js:15859:20)
-renderWithHoo
s (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/re
act-reconciler/cjs/react-reconciler.development.js:3221:22)
-updateFunctionComp
nent (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modul
es/react-reconciler/cjs/react-reconciler.development.js:6475:19)
-beginWor
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/react-r
econciler/cjs/react-reconciler.development.js:8009:18)
-runWithFiberIn
EV (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:1738:13)
-performUnitOfW
rk (/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/r
eact-reconciler/cjs/react-reconciler.development.js:12834:22)
-workLoopSyn
(/Users/keithguerin/Documents/gemini-cli/loader-animation-adjustment/node_modules/reac
t-reconciler/cjs/react-reconciler.development.js:12644:41)
"
`;
exports[`InputPrompt > snapshots > should not show inverted cursor when shell is focused 1`] = `
"▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
> Type your message or @path/to/file