fix(input) Resolve cases where escape was broken (#6304)

This commit is contained in:
Jacob Richman
2025-08-15 10:54:00 -07:00
committed by GitHub
parent 1a2906a8ad
commit bd5e49c5ff
14 changed files with 697 additions and 582 deletions

View File

@@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { render } from 'ink-testing-library';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { AuthDialog } from './AuthDialog.js';
import { LoadedSettings, SettingScope } from '../../config/settings.js';
import { AuthType } from '@google/gemini-cli-core';
import { renderWithProviders } from '../../test-utils/render.js';
describe('AuthDialog', () => {
const wait = (ms = 50) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -47,7 +47,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog
onSelect={() => {}}
settings={settings}
@@ -84,7 +84,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -117,7 +117,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -150,7 +150,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -184,7 +184,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -213,7 +213,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -244,7 +244,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame } = render(
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
@@ -279,7 +279,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame, stdin, unmount } = render(
const { lastFrame, stdin, unmount } = renderWithProviders(
<AuthDialog onSelect={onSelect} settings={settings} />,
);
await wait();
@@ -318,7 +318,7 @@ describe('AuthDialog', () => {
[],
);
const { lastFrame, stdin, unmount } = render(
const { lastFrame, stdin, unmount } = renderWithProviders(
<AuthDialog
onSelect={onSelect}
settings={settings}
@@ -360,7 +360,7 @@ describe('AuthDialog', () => {
[],
);
const { stdin, unmount } = render(
const { stdin, unmount } = renderWithProviders(
<AuthDialog onSelect={onSelect} settings={settings} />,
);
await wait();