icedwright 0.0.1

The icedwright test harness: run an iced 0.14 program headlessly on virtual time
Documentation
//! The icedwright harness: run a whole iced 0.14 program headlessly, on a virtual clock, and
//! find its widgets by role and name.
//!
//! [`Harness`] boots a [`TestProgram`] on its own current-thread tokio runtime whose clock is
//! paused and starts one virtual day ahead of the real one. Every task and subscription the
//! program starts runs on that runtime, virtual time moves only when nothing is runnable, and
//! every call blocks the test thread until the app has settled, so tests are plain `#[test]`
//! functions that give the same result on every run.

#![deny(missing_docs)]
#![warn(clippy::must_use_candidate, clippy::return_self_not_must_use)]

pub mod actions;
mod config;
mod driver;
mod effects;
mod error;
pub mod expect;
mod fakes;
mod harness;
mod headed;
mod macros;
mod messages;
mod observer;
pub mod prelude;
mod render;
mod runtime;
pub mod snapshot;
pub mod testing;
pub mod time;
mod trace;
mod watchdog;
mod windows;

pub use actions::{
    ActionError, ActionFailure, ActionReport, Blocker, Click, ClickCount, Done, Drag, Hover, Ime,
    Keyboard, KeyboardLayout, Mouse, OptionMatch, Type,
};
pub use config::{
    Draw, EnvOverrides, HangAfter, HarnessBuilder, HarnessConfig, Platform, RealClock, SystemClock,
};
pub use effects::{
    ExternalSource, RuleId, Spawn, TaskId, TaskInfo, TaskRules, TaskState, Tasks, UntypedTaskId,
};
pub use error::{ConfigError, Error, HangCause, HarnessError, Result};
pub use expect::{
    ClipboardExpect, Expect, ExpectError, Mark, MessagePattern, MessagesExpect, Soft, SoftMessages,
    StateExpect, TasksExpect, WindowsExpect, expect,
};
pub use fakes::{ClipboardWrite, FakeClipboard, WindowRequest, Writer};
pub use harness::{
    Diagnostic, DiagnosticKind, ExternalWait, Handle, Harness, Probed, Resolved, Severity,
    TestProgram,
};
pub use headed::{Headed, HeadedLink};
pub use icedwright_check::assertion::{NodeMatcher, NodeView, Outcome, ValueMatch};
pub use icedwright_types::input::{Chord, Keystroke, ModifierSet};
pub use icedwright_types::{Checked, Role};
#[doc(hidden)]
pub use macros::__private;
pub use messages::{MessageCoverage, MessageOrigin, MessageRecord};
pub use observer::{StepObserver, StepRecord, TaskChange};
pub use snapshot::fonts;
pub use snapshot::{Caret, RenderOptions, Screenshot, SnapshotError, Variant};
pub use testing::matrix;
pub use testing::{
    CoverageFile, Environment, Fixture, FixtureError, FixtureSet, Mount, MountProgram, RuntimeRef,
    Seed, TempDir, TestOutcome,
};
pub use windows::{WindowInfo, WindowRef};

pub use icedwright_macros::{matrix, suite, test};

pub use icedwright_locator::{
    AnyRole, IntoLocator, IntoTestId, Locator, RoleKind, RoleType, Scope, TestId, TextMatch, role,
};
pub use icedwright_probe::{Fallible, Named, NamedTask, TaskName, task_name};
pub use icedwright_semantics::SemanticTree;
pub use icedwright_types::Frame;

/// The unit and geometry types, shared with every icedwright crate.
pub mod units {
    pub use icedwright_types::units::{
        InvalidRatio, InvalidScaleFactor, Logical, Physical, Ratio, ScaleFactor,
    };
    pub use icedwright_types::{Point, Rect, Size, Vector};
}

/// Test-side fakes for services an app reaches through its own traits.
pub mod fake {
    pub use crate::fakes::calls::{Calls, Unanswered};
}