aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/tests/popup_focus_projection.rs
diff options
context:
space:
mode:
authorMark Jaquith <mark@jaquith.me>2026-09-14 15:47:53 -0400
committerGitHub <noreply@github.com>2026-09-14 21:47:53 +0200
commitb0f21ed2cb85613050b794bf6c78a7c367a94e0d (patch)
tree25c14e09338f5300bedbc8131aa23fab3d37add9 /src/client/shell/tests/popup_focus_projection.rs
parentd8b36691d10c6055293ad45324b22af8b8f570e5 (diff)
feat: add cursor-based editing to text inputs (#3698)
* feat: add cursor-based editing to text inputs refs #1803 * fix: preserve dialog actions with associated text refs #1803 * refactor: simplify text editor outcomes and tests refs #1803 --------- Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'src/client/shell/tests/popup_focus_projection.rs')
-rw-r--r--src/client/shell/tests/popup_focus_projection.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client/shell/tests/popup_focus_projection.rs b/src/client/shell/tests/popup_focus_projection.rs
index 044ef145..aa44bf6d 100644
--- a/src/client/shell/tests/popup_focus_projection.rs
+++ b/src/client/shell/tests/popup_focus_projection.rs
@@ -37,8 +37,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
state.overlay = Some(ClientShellOverlay::Rename(ClientRenameOverlay {
title: "rename pane",
- input: String::new(),
- replace_on_type: false,
+ input: TextEditor::default(),
target: ClientRenameTarget::Pane {
pane_id: "pane_1".into(),
},
@@ -49,9 +48,8 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
ClientWorktreeCreateOverlay {
source_workspace_id: "ws_1".into(),
repo_name: "repo".into(),
- branch: String::new(),
+ branch: TextEditor::default(),
checkout_path: String::new(),
- replace_on_type: false,
error: None,
creating: true,
},
@@ -67,7 +65,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
source_workspace_id: "ws_1".into(),
entries: Vec::new(),
selected: 0,
- query: String::new(),
+ query: TextEditor::default(),
search_focused: false,
error: None,
opening: false,
@@ -80,7 +78,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
assert!(state.modal_paste_target_active());
state.overlay = Some(ClientShellOverlay::Navigator(ClientNavigatorOverlay {
- query: String::new(),
+ query: TextEditor::default(),
search_focused: false,
selected: None,
scroll: 0,
@@ -94,7 +92,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
assert!(state.modal_paste_target_active());
state.overlay = Some(ClientShellOverlay::Help(ClientHelpOverlay {
- query: String::new(),
+ query: TextEditor::default(),
search_focused: false,
scroll: 0,
}));
@@ -116,7 +114,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
selection: None,
search_prompt: Some(ClientCopySearchPrompt {
direction: crate::api::schema::PaneCopySearchDirection::Forward,
- query: String::new(),
+ query: TextEditor::default(),
}),
search_query: String::new(),
search_direction: None,
@@ -127,6 +125,7 @@ fn modal_paste_target_requires_a_focused_editable_client_field() {
search_generation: 0,
copy_after_search: false,
});
+ state.mode = ClientShellMode::Copy;
assert!(state.modal_paste_target_active());
state.popup_pending = true;
assert!(!state.modal_paste_target_active());