Skip to main content

VerifyBuilder

Struct VerifyBuilder 

Source
pub struct VerifyBuilder<'a> { /* private fields */ }
Expand description

Fluent assertion builder for full-stack Tauri test verification.

Collects multiple checks (DOM, IPC, network, state) and reports all failures together rather than stopping at the first one.

§Example

let report = client.verify()
    .has_text("Hello, World!")
    .has_no_text("Error")
    .ipc_was_called("greet")
    .ipc_was_called_with("greet", json!({"name": "World"}))
    .ipc_was_not_called("delete_account")
    .no_console_errors()
    .run()
    .await
    .unwrap();

report.assert_all_passed();

Implementations§

Source§

impl<'a> VerifyBuilder<'a>

Source

pub fn has_text(self, text: &str) -> Self

Assert that the page currently contains the given text.

Source

pub fn has_no_text(self, text: &str) -> Self

Assert that the page does NOT contain the given text.

Source

pub fn ipc_was_called(self, command: &str) -> Self

Assert that an IPC command was called at least once.

Source

pub fn ipc_was_called_with(self, command: &str, args: Value) -> Self

Assert that an IPC command was called with specific arguments.

Source

pub fn ipc_was_not_called(self, command: &str) -> Self

Assert that an IPC command was never called.

Source

pub fn network_request(self, method: Option<&str>, url_contains: &str) -> Self

Assert a network request was made matching the given URL substring.

Source

pub fn no_network_request(self, url_contains: &str) -> Self

Assert NO network request was made matching the given URL substring.

Source

pub fn no_console_errors(self) -> Self

Assert that no console errors were logged.

Source

pub fn state_matches(self, frontend_expr: &str, backend_state: Value) -> Self

Assert that frontend state matches backend state.

Source

pub fn ipc_healthy(self) -> Self

Assert that IPC integrity is healthy (no stale/errored calls).

Source

pub fn no_ghost_commands(self) -> Self

Assert that there are no ghost commands.

Source

pub fn coverage_above(self, threshold: f64) -> Self

Assert that IPC command coverage meets the given threshold percentage.

Queries the command registry and IPC log to compute how many registered commands have been exercised, then checks whether the coverage percentage is at or above threshold.

Source

pub async fn run(self) -> Result<VerifyReport, TestError>

Execute all queued checks and return the report.

§Errors

Returns TestError only on transport/connection failures. Check failures are reported in the VerifyReport, not as errors.

Auto Trait Implementations§

§

impl<'a> Freeze for VerifyBuilder<'a>

§

impl<'a> !RefUnwindSafe for VerifyBuilder<'a>

§

impl<'a> Send for VerifyBuilder<'a>

§

impl<'a> Sync for VerifyBuilder<'a>

§

impl<'a> Unpin for VerifyBuilder<'a>

§

impl<'a> UnsafeUnpin for VerifyBuilder<'a>

§

impl<'a> !UnwindSafe for VerifyBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more