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>
impl<'a> VerifyBuilder<'a>
Sourcepub fn has_text(self, text: &str) -> Self
pub fn has_text(self, text: &str) -> Self
Assert that the page currently contains the given text.
Sourcepub fn has_no_text(self, text: &str) -> Self
pub fn has_no_text(self, text: &str) -> Self
Assert that the page does NOT contain the given text.
Sourcepub fn ipc_was_called(self, command: &str) -> Self
pub fn ipc_was_called(self, command: &str) -> Self
Assert that an IPC command was called at least once.
Sourcepub fn ipc_was_called_with(self, command: &str, args: Value) -> Self
pub fn ipc_was_called_with(self, command: &str, args: Value) -> Self
Assert that an IPC command was called with specific arguments.
Sourcepub fn ipc_was_not_called(self, command: &str) -> Self
pub fn ipc_was_not_called(self, command: &str) -> Self
Assert that an IPC command was never called.
Sourcepub fn network_request(self, method: Option<&str>, url_contains: &str) -> Self
pub fn network_request(self, method: Option<&str>, url_contains: &str) -> Self
Assert a network request was made matching the given URL substring.
Sourcepub fn no_network_request(self, url_contains: &str) -> Self
pub fn no_network_request(self, url_contains: &str) -> Self
Assert NO network request was made matching the given URL substring.
Sourcepub fn no_console_errors(self) -> Self
pub fn no_console_errors(self) -> Self
Assert that no console errors were logged.
Sourcepub fn state_matches(self, frontend_expr: &str, backend_state: Value) -> Self
pub fn state_matches(self, frontend_expr: &str, backend_state: Value) -> Self
Assert that frontend state matches backend state.
Sourcepub fn ipc_healthy(self) -> Self
pub fn ipc_healthy(self) -> Self
Assert that IPC integrity is healthy (no stale/errored calls).
Sourcepub fn no_ghost_commands(self) -> Self
pub fn no_ghost_commands(self) -> Self
Assert that there are no ghost commands.
Sourcepub fn coverage_above(self, threshold: f64) -> Self
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.
Sourcepub async fn run(self) -> Result<VerifyReport, TestError>
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.