summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/plugins/unit/plugin_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-server/src/plugins/unit/plugin_tests.rs')
-rw-r--r--zellij-server/src/plugins/unit/plugin_tests.rs415
1 files changed, 254 insertions, 161 deletions
diff --git a/zellij-server/src/plugins/unit/plugin_tests.rs b/zellij-server/src/plugins/unit/plugin_tests.rs
index 98fe1a075..07212c3b3 100644
--- a/zellij-server/src/plugins/unit/plugin_tests.rs
+++ b/zellij-server/src/plugins/unit/plugin_tests.rs
@@ -8,9 +8,11 @@ use tempfile::tempdir;
use wasmer::Store;
use zellij_utils::data::{Event, Key, PermissionStatus, PermissionType, PluginCapabilities};
use zellij_utils::errors::ErrorContext;
-use zellij_utils::input::layout::{Layout, PluginUserConfiguration, RunPlugin, RunPluginLocation};
+use zellij_utils::input::layout::{
+ Layout, PluginAlias, PluginUserConfiguration, RunPlugin, RunPluginLocation, RunPluginOrAlias,
+};
use zellij_utils::input::permission::PermissionCache;
-use zellij_utils::input::plugins::PluginsConfig;
+use zellij_utils::input::plugins::PluginAliases;
use zellij_utils::ipc::ClientAttributes;
use zellij_utils::lazy_static::lazy_static;
use zellij_utils::pane_size::Size;
@@ -249,6 +251,17 @@ fn create_plugin_thread(
let plugin_capabilities = PluginCapabilities::default();
let client_attributes = ClientAttributes::default();
let default_shell_action = None; // TODO: change me
+ let mut plugin_aliases = PluginAliases::default();
+ plugin_aliases.aliases.insert(
+ "fixture_plugin_for_tests".to_owned(),
+ RunPlugin::from_url(&format!(
+ "file:{}/../target/e2e-data/plugins/fixture-plugin-for-tests.wasm",
+ std::env::var_os("CARGO_MANIFEST_DIR")
+ .unwrap()
+ .to_string_lossy()
+ ))
+ .unwrap(),
+ );
let plugin_thread = std::thread::Builder::new()
.name("plugin_thread".to_string())
.spawn(move || {
@@ -257,13 +270,13 @@ fn create_plugin_thread(
plugin_bus,
store,
data_dir,
- PluginsConfig::default(),
Box::new(Layout::default()),
default_shell,
zellij_cwd,
plugin_capabilities,
client_attributes,
default_shell_action,
+ Box::new(plugin_aliases),
)
.expect("TEST")
})
@@ -335,13 +348,13 @@ fn create_plugin_thread_with_server_receiver(
plugin_bus,
store,
data_dir,
- PluginsConfig::default(),
Box::new(Layout::default()),
default_shell,
zellij_cwd,
plugin_capabilities,
client_attributes,
default_shell_action,
+ Box::new(PluginAliases::default()),
)
.expect("TEST");
})
@@ -419,13 +432,13 @@ fn create_plugin_thread_with_pty_receiver(
plugin_bus,
store,
data_dir,
- PluginsConfig::default(),
Box::new(Layout::default()),
default_shell,
zellij_cwd,
plugin_capabilities,
client_attributes,
default_shell_action,
+ Box::new(PluginAliases::default()),
)
.expect("TEST")
})
@@ -498,13 +511,13 @@ fn create_plugin_thread_with_background_jobs_receiver(
plugin_bus,
store,
data_dir,
- PluginsConfig::default(),
Box::new(Layout::default()),
default_shell,
zellij_cwd,
plugin_capabilities,
client_attributes,
default_shell_action,
+ Box::new(PluginAliases::default()),
)
.expect("TEST")
})
@@ -554,11 +567,90 @@ pub fn load_new_plugin_from_hd() {
let (plugin_thread_sender, screen_receiver, teardown) = create_plugin_thread(None);
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
+ });
+ let tab_index = 1;
+ let client_id = 1;
+ let size = Size {
+ cols: 121,
+ rows: 20,
};
+ let received_screen_instructions = Arc::new(Mutex::new(vec![]));
+ let screen_thread = grant_permissions_and_log_actions_in_thread!(
+ received_screen_instructions,
+ ScreenInstruction::PluginBytes,
+ screen_receiver,
+ 1,
+ &PermissionType::ChangeApplicationState,
+ cache_path,
+ plugin_thread_sender,
+ client_id
+ );
+
+ let _ = plugin_thread_sender.send(PluginInstruction::AddClient(client_id));
+ let _ = plugin_thread_sender.send(PluginInstruction::Load(
+ plugin_should_float,
+ false,
+ plugin_title,
+ run_plugin,
+ tab_index,
+ None,
+ client_id,
+ size,
+ None,
+ false,
+ ));
+ std::thread::sleep(std::time::Duration::from_millis(500));
+ let _ = plugin_thread_sender.send(PluginInstruction::Update(vec![(
+ None,
+ Some(client_id),
+ Event::InputReceived,
+ )])); // will be cached and sent to the plugin once it's loaded
+ screen_thread.join().unwrap(); // this might take a while if the cache is cold
+ teardown();
+ let plugin_bytes_event = received_screen_instructions
+ .lock()
+ .unwrap()
+ .iter()
+ .find_map(|i| {
+ if let ScreenInstruction::PluginBytes(plugin_render_assets) = i {
+ for plugin_render_asset in plugin_render_assets {
+ let plugin_id = plugin_render_asset.plugin_id;
+ let client_id = plugin_render_asset.client_id;
+ let plugin_bytes = plugin_render_asset.bytes.clone();
+ let plugin_bytes = String::from_utf8_lossy(plugin_bytes.as_slice()).to_string();
+ if plugin_bytes.contains("InputReceived") {
+ return Some((plugin_id, client_id, plugin_bytes));
+ }
+ }
+ }
+ None
+ });
+ assert_snapshot!(format!("{:#?}", plugin_bytes_event));
+}
+
+#[test]
+#[ignore]
+pub fn load_new_plugin_with_plugin_alias() {
+ // here we load our fixture plugin into the plugin thread, and then send it an update message
+ // expecting tha thte plugin will log the received event and render it later after the update
+ // message (this is what the fixture plugin does)
+ // we then listen on our mock screen receiver to make sure we got a PluginBytes instruction
+ // that contains said render, and assert against it
+ let temp_folder = tempdir().unwrap(); // placed explicitly in the test scope because its
+ let plugin_host_folder = PathBuf::from(temp_folder.path());
+ let cache_path = plugin_host_folder.join("permissions_test.kdl");
+ let (plugin_thread_sender, screen_receiver, teardown) = create_plugin_thread(None);
+ let plugin_should_float = Some(false);
+ let plugin_title = Some("test_plugin".to_owned());
+ let run_plugin = RunPluginOrAlias::Alias(PluginAlias {
+ name: "fixture_plugin_for_tests".to_owned(),
+ configuration: Default::default(),
+ run_plugin: None,
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -629,11 +721,11 @@ pub fn plugin_workers() {
let plugin_host_folder = PathBuf::from(temp_folder.path());
let cache_path = plugin_host_folder.join("permissions_test.kdl");
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -708,11 +800,11 @@ pub fn plugin_workers_persist_state() {
let plugin_host_folder = PathBuf::from(temp_folder.path());
let cache_path = plugin_host_folder.join("permissions_test.kdl");
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -797,11 +889,11 @@ pub fn can_subscribe_to_hd_events() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -874,11 +966,11 @@ pub fn switch_to_mode_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -945,11 +1037,11 @@ pub fn switch_to_mode_plugin_command_permission_denied() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1016,11 +1108,11 @@ pub fn new_tabs_with_layout_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1101,11 +1193,11 @@ pub fn new_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1172,11 +1264,11 @@ pub fn go_to_next_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1242,11 +1334,11 @@ pub fn go_to_previous_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1312,11 +1404,11 @@ pub fn resize_focused_pane_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1382,11 +1474,11 @@ pub fn resize_focused_pane_with_direction_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1452,11 +1544,11 @@ pub fn focus_next_pane_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1522,11 +1614,11 @@ pub fn focus_previous_pane_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1592,11 +1684,11 @@ pub fn move_focus_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1662,11 +1754,11 @@ pub fn move_focus_or_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1732,11 +1824,11 @@ pub fn edit_scrollback_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1802,11 +1894,11 @@ pub fn write_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1872,11 +1964,11 @@ pub fn write_chars_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -1942,11 +2034,11 @@ pub fn toggle_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2012,11 +2104,11 @@ pub fn move_pane_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2082,11 +2174,11 @@ pub fn move_pane_with_direction_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2152,11 +2244,11 @@ pub fn clear_screen_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2223,11 +2315,11 @@ pub fn scroll_up_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2294,11 +2386,11 @@ pub fn scroll_down_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2364,11 +2456,11 @@ pub fn scroll_to_top_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2434,11 +2526,11 @@ pub fn scroll_to_bottom_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2504,11 +2596,11 @@ pub fn page_scroll_up_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2574,11 +2666,11 @@ pub fn page_scroll_down_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2644,11 +2736,11 @@ pub fn toggle_focus_fullscreen_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2714,11 +2806,11 @@ pub fn toggle_pane_frames_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2784,11 +2876,11 @@ pub fn toggle_pane_embed_or_eject_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2854,11 +2946,11 @@ pub fn undo_rename_pane_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2924,11 +3016,11 @@ pub fn close_focus_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -2994,11 +3086,11 @@ pub fn toggle_active_tab_sync_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -3064,11 +3156,11 @@ pub fn close_focused_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -3134,11 +3226,11 @@ pub fn undo_rename_tab_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -3204,11 +3296,11 @@ pub fn previous_swap_layout_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -3274,11 +3366,11 @@ pub fn next_swap_layout_plugin_command() {
create_plugin_thread(Some(plugin_host_folder));
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- let run_plugin = RunPlugin {
+ let run_plugin = RunPluginOrAlias::RunPlugin(RunPlugin {
_allow_exec_host_cmd: false,
location: RunPluginLocation::File(PathBuf::from(&*PLUGIN_FIXTURE)),
configuration: Default::default(),
- };
+ });
let tab_index = 1;
let client_id = 1;
let size = Size {
@@ -3344,11 +3436,11 @@ pub fn go_to_tab_name_plugin_command() {
create_plugin_thread(Some(