aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/tests')
-rw-r--r--src/client/shell/tests/popup_focus_projection.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/shell/tests/popup_focus_projection.rs b/src/client/shell/tests/popup_focus_projection.rs
index 25d3b334..7f3ea137 100644
--- a/src/client/shell/tests/popup_focus_projection.rs
+++ b/src/client/shell/tests/popup_focus_projection.rs
@@ -885,6 +885,25 @@ fn pane_scrollbar_track_and_thumb_use_stable_endpoint_scroll_requests() {
}
#[test]
+fn clear_pane_binding_targets_the_focused_endpoint_pane() {
+ let mut state = ClientShellState::new(ClientShellConfig::from_config(&Config::default()));
+ state.set_snapshot(Box::new(snapshot()));
+ state.set_pane_surface(surface());
+ let mut input = ClientShellInput::default();
+ state.record_binding(
+ crate::input::KeybindMatch::Action(crate::input::KeybindAction::ClearPane),
+ &mut input,
+ );
+ assert!(input.requests.is_empty());
+ assert!(matches!(
+ &input.actions[..],
+ [ClientShellAction::Endpoint { request, .. }]
+ if matches!(&request.method, crate::api::schema::Method::PaneClear(target)
+ if target.pane_id == "pane_1")
+ ));
+}
+
+#[test]
fn edit_scrollback_binding_targets_the_focused_endpoint_pane() {
let mut state = ClientShellState::new(ClientShellConfig::from_config(&Config::default()));
state.set_snapshot(Box::new(snapshot()));