diff --git a/tests/app.rs b/tests/app.rs index 710e7d4..51b1da0 100644 --- a/tests/app.rs +++ b/tests/app.rs @@ -16,7 +16,7 @@ use tokio::{task::JoinHandle, time::timeout}; /// Default timeout for tests. /// /// This is kept quite high to avoid flakiness in CI. -const DEFAULT_TIMEOUT: Duration = Duration::from_millis(100); +const DEFAULT_TIMEOUT: Duration = Duration::from_millis(1000); /// Sets up an app with a file channel and default config. /// diff --git a/tests/cli/cli_input.rs b/tests/cli/cli_input.rs index d4e588b..5464888 100644 --- a/tests/cli/cli_input.rs +++ b/tests/cli/cli_input.rs @@ -3,8 +3,12 @@ //! These tests verify Television's input handling and user interaction features, //! ensuring users can customize their interaction experience and search behavior. +use std::path::Path; + use super::common::*; +const TARGET_DIR: &str = "tests/target_dir"; + /// Tests that the --input flag pre-fills the search box with specified text. #[test] fn test_input_prefills_search_box() { @@ -84,7 +88,11 @@ fn test_exact_matching_enabled() { // This enables exact substring matching instead of the default fuzzy matching let cmd = tv_local_config_and_cable_with_args(&[ - "files", "--exact", "--input", "file1", + "files", + "--exact", + "--input", + "file1", + Path::new(TARGET_DIR).to_str().unwrap(), ]); let mut child = tester.spawn_command_tui(cmd); @@ -102,7 +110,11 @@ fn test_exact_matching_enabled_fails() { // This enables exact substring matching instead of the default fuzzy matching let cmd = tv_local_config_and_cable_with_args(&[ - "files", "--exact", "--input", "fl1", + "files", + "--exact", + "--input", + "fl1", + Path::new(TARGET_DIR).to_str().unwrap(), ]); let mut child = tester.spawn_command_tui(cmd);