mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
fix(input) Resolve cases where escape was broken (#6304)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user