Skip to main content

Module prelude

Module prelude 

Source
Expand description

What the tests and the helpers of a test crate usually need.

Re-exports§

pub use crate::browser_tests;
pub use crate::ctx::normalize;
pub use crate::ctx::xpath_literal;
pub use crate::http_tests;
pub use crate::runner::TestCase;
pub use crate::runner::known_failures;
pub use crate::runner::run_suite;

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
bail
Return early with an error.
browser_tests
browser_tests![module::test, ...]: tests taking a Ctx.
ensure
Return early with an error if a condition is not satisfied.
http_tests
http_tests![module::test, ...]: tests taking an Arc of the environment.
json
Construct a serde_json::Value from a JSON literal.

Structs§

Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
By
Element Selector struct providing a convenient way to specify selectors.
Duration
A Duration type to represent a span of time, typically used for system timeouts.
SelectElement
Convenience wrapper for <select> elements.
WebElement
The WebElement struct encapsulates a single element on a page.

Enums§

Key
Value
Represents any valid JSON value.

Traits§

Context
Provides the context method for Result.

Type Aliases§

Result
Result<T, Error>