test: add missing test target directory to flaky tests

This commit is contained in:
alexandre pasmantier 2025-07-14 12:55:08 +02:00
parent 3e4267dad4
commit 2ae95cdbb1
2 changed files with 15 additions and 3 deletions

View File

@ -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.
///

View File

@ -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);