feat(e2e): add test mode infrastructure with BTERMINAL_TEST env isolation
Rust: watcher.rs/fs_watcher.rs skip watchers in test mode, is_test_mode Tauri command. Frontend: wake-scheduler disable, App.svelte test mode detection. AppConfig centralization in bterminal-core (OnceLock pattern for path overrides).
This commit is contained in:
parent
01c8ab8b3e
commit
4b86065163
18 changed files with 346 additions and 29 deletions
|
|
@ -73,6 +73,12 @@ impl ProjectFsWatcher {
|
|||
project_id: &str,
|
||||
cwd: &str,
|
||||
) -> Result<(), String> {
|
||||
// In test mode, skip inotify watchers to avoid resource contention and flaky events
|
||||
if std::env::var("BTERMINAL_TEST").map_or(false, |v| v == "1") {
|
||||
log::info!("Test mode: skipping fs watcher for project {project_id}");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let cwd_path = Path::new(cwd);
|
||||
if !cwd_path.is_dir() {
|
||||
return Err(format!("Not a directory: {cwd}"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue