Extend task templates with shell and hide fields to use custom shells and custom close behavior (#15031)

This commit is contained in:
Kirill Bulatov 2024-07-23 22:58:36 +03:00 committed by GitHub
parent 4a43084cb7
commit b2b9d4ccb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 302 additions and 148 deletions

View file

@ -1000,7 +1000,7 @@ mod tests {
path::{Path, PathBuf},
time::Duration,
};
use task::{RevealStrategy, SpawnInTerminal};
use task::{HideStrategy, RevealStrategy, Shell, SpawnInTerminal};
use theme::{ThemeRegistry, ThemeSettings};
use workspace::{
item::{Item, ItemHandle},
@ -3349,6 +3349,8 @@ mod tests {
use_new_terminal: false,
allow_concurrent_runs: false,
reveal: RevealStrategy::Always,
hide: HideStrategy::Never,
shell: Shell::System,
};
let project = Project::test(app_state.fs.clone(), [project_root.path()], cx).await;
let window = cx.add_window(|cx| Workspace::test_new(project, cx));
@ -3356,7 +3358,7 @@ mod tests {
cx.update(|cx| {
window
.update(cx, |_workspace, cx| {
cx.emit(workspace::Event::SpawnTask(spawn_in_terminal));
cx.emit(workspace::Event::SpawnTask(Box::new(spawn_in_terminal)));
})
.unwrap();
});