aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-integration-tests/src/lib.rs
blob: 4a278d0ef35ae611053e54ee8d05388013ec999f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![cfg(unix)]

pub mod client_screen;
pub mod fake_client_os_api;
pub mod fake_pty;
pub mod fake_server_os_api;
pub mod harness;
pub mod keys;
pub mod nested;
pub mod runner;
pub mod test_env;

pub use client_screen::{
    col, CellStyle, ClientScreen, Coord, CoordBuilder, CursorPosition, GridSnapshot,
};
pub use fake_pty::FakePtyHandle;
pub use harness::{
    claim_first_terminal_and_wait_for_prompt, split_down_and_wait_for_prompt,
    split_right_and_wait_for_prompt, start_zellij, PROMPT, TERMINAL_SIZE,
};
pub use nested::{
    composite_contains_settled_guest_grid, guest_ascended_bar_settled, host_descended_bar_settled,
    host_descended_bar_with_ascend_keys_settled, wait_for_settled_composite,
    NestedDepthThreeHarness, NestedHarness,
};
pub use runner::{assert_same_rendered_grid, normalized, TestClient, TestRunner, TestSession};
pub use zellij_utils::data::LayoutInfo;
pub use zellij_utils::pane_size::Size;

use std::time::Duration;

pub fn default_timeout() -> Duration {
    std::env::var("ZELLIJ_TEST_TIMEOUT_MS")
        .ok()
        .and_then(|v| v.parse().ok())
        .map(Duration::from_millis)
        .unwrap_or(Duration::from_secs(10))
}