From bd5e49c5ff0d0f5e03e5f42435de00c5a0758d7e Mon Sep 17 00:00:00 2001 From: Jacob Richman Date: Fri, 15 Aug 2025 10:54:00 -0700 Subject: fix(input) Resolve cases where escape was broken (#6304) --- .../cli/src/ui/components/SettingsDialog.test.tsx | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'packages/cli/src/ui/components/SettingsDialog.test.tsx') diff --git a/packages/cli/src/ui/components/SettingsDialog.test.tsx b/packages/cli/src/ui/components/SettingsDialog.test.tsx index 94f33561..e636bad5 100644 --- a/packages/cli/src/ui/components/SettingsDialog.test.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.test.tsx @@ -21,8 +21,8 @@ * */ -import { render } from 'ink-testing-library'; import { waitFor } from '@testing-library/react'; +import { renderWithProviders } from '../../test-utils/render.js'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { SettingsDialog } from './SettingsDialog.js'; import { LoadedSettings, SettingScope } from '../../config/settings.js'; @@ -102,7 +102,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -116,7 +116,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -129,7 +129,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -144,7 +144,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -160,7 +160,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -177,7 +177,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -194,7 +194,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -212,7 +212,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -227,7 +227,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -242,7 +242,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -261,7 +261,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -280,7 +280,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame, stdin, unmount } = render( + const { lastFrame, stdin, unmount } = renderWithProviders( , ); @@ -308,7 +308,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onRestartRequest = vi.fn(); - const { unmount } = render( + const { unmount } = renderWithProviders( {}} @@ -327,7 +327,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onRestartRequest = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( {}} @@ -349,7 +349,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -368,7 +368,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings({ vimMode: true }); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -392,7 +392,7 @@ describe('SettingsDialog', () => { ); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -409,7 +409,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -427,7 +427,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -449,7 +449,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -468,7 +468,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , @@ -492,7 +492,7 @@ describe('SettingsDialog', () => { ); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -505,7 +505,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -521,7 +521,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame, unmount } = render( + const { lastFrame, unmount } = renderWithProviders( , ); @@ -541,7 +541,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { unmount } = render( + const { unmount } = renderWithProviders( , ); @@ -559,7 +559,7 @@ describe('SettingsDialog', () => { ); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -576,7 +576,7 @@ describe('SettingsDialog', () => { ); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -591,7 +591,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -610,7 +610,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings({ vimMode: true }); // Start with vimMode enabled const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -626,7 +626,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings({ vimMode: true }); // Start with vimMode enabled const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -642,7 +642,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -659,7 +659,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { lastFrame, stdin, unmount } = render( + const { lastFrame, stdin, unmount } = renderWithProviders( , ); @@ -692,7 +692,7 @@ describe('SettingsDialog', () => { ); const onSelect = vi.fn(); - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -705,7 +705,7 @@ describe('SettingsDialog', () => { const onSelect = vi.fn(); // Should not crash even if some settings are missing definitions - const { lastFrame } = render( + const { lastFrame } = renderWithProviders( , ); @@ -718,7 +718,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -763,7 +763,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -792,7 +792,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings({ vimMode: true }); const onSelect = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( , ); @@ -816,7 +816,7 @@ describe('SettingsDialog', () => { const settings = createMockSettings(); const onRestartRequest = vi.fn(); - const { stdin, unmount } = render( + const { stdin, unmount } = renderWithProviders( {}} -- cgit v1.2.3