aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/tests/popup_focus_projection.rs
diff options
context:
space:
mode:
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());