pub struct Checkpoint {
pub checkpoint_type: CheckpointType,
pub expected: String,
pub timeout_ms: Option<u64>,
pub description: Option<String>,
}Expand description
A checkpoint condition to verify after a step.
Fields§
§checkpoint_type: CheckpointTypeType of checkpoint.
expected: StringExpected value or condition.
timeout_ms: Option<u64>Optional timeout in milliseconds.
description: Option<String>Description of what we’re checking.
Implementations§
Source§impl Checkpoint
impl Checkpoint
Sourcepub fn url_contains(pattern: impl Into<String>) -> Checkpoint
pub fn url_contains(pattern: impl Into<String>) -> Checkpoint
Create a URL contains checkpoint.
Sourcepub fn element_exists(selector: impl Into<String>) -> Checkpoint
pub fn element_exists(selector: impl Into<String>) -> Checkpoint
Create an element exists checkpoint.
Sourcepub fn text_contains(text: impl Into<String>) -> Checkpoint
pub fn text_contains(text: impl Into<String>) -> Checkpoint
Create a text contains checkpoint.
Sourcepub fn js_condition(condition: impl Into<String>) -> Checkpoint
pub fn js_condition(condition: impl Into<String>) -> Checkpoint
Create a JavaScript condition checkpoint.
Sourcepub fn element_not_exists(selector: impl Into<String>) -> Checkpoint
pub fn element_not_exists(selector: impl Into<String>) -> Checkpoint
Create an element not exists checkpoint.
Sourcepub fn with_timeout(self, ms: u64) -> Checkpoint
pub fn with_timeout(self, ms: u64) -> Checkpoint
Set timeout.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Checkpoint
pub fn with_description(self, desc: impl Into<String>) -> Checkpoint
Set description.
Sourcepub fn from_json(value: &Value) -> Option<Checkpoint>
pub fn from_json(value: &Value) -> Option<Checkpoint>
Parse from JSON.
Trait Implementations§
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Source§fn clone(&self) -> Checkpoint
fn clone(&self) -> Checkpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Checkpoint
impl Debug for Checkpoint
Source§impl<'de> Deserialize<'de> for Checkpoint
impl<'de> Deserialize<'de> for Checkpoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Checkpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Checkpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Checkpoint
impl Serialize for Checkpoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Checkpoint
impl RefUnwindSafe for Checkpoint
impl Send for Checkpoint
impl Sync for Checkpoint
impl Unpin for Checkpoint
impl UnsafeUnpin for Checkpoint
impl UnwindSafe for Checkpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more