pub struct Expect<'a, T> {
pub subject: &'a T,
pub timeout: Duration,
pub is_not: bool,
pub is_soft: bool,
pub message: Option<String>,
}Expand description
Auto-retrying assertion builder.
Fields§
§subject: &'a T§timeout: Duration§is_not: bool§is_soft: bool§message: Option<String>Implementations§
Source§impl Expect<'_, HttpResponse>
impl Expect<'_, HttpResponse>
pub fn to_be_ok(&self) -> Result<(), AssertionFailure>
Source§impl<T> Expect<'_, T>
impl<T> Expect<'_, T>
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Override the timeout for this assertion.
Sourcepub fn with_message(self, msg: impl Into<String>) -> Self
pub fn with_message(self, msg: impl Into<String>) -> Self
Custom failure-message prefix.
Source§impl Expect<'_, Locator>
impl Expect<'_, Locator>
pub async fn to_be_visible(&self) -> Result<(), AssertionFailure>
pub async fn to_be_enabled(&self) -> Result<(), AssertionFailure>
pub async fn to_be_disabled(&self) -> Result<(), AssertionFailure>
pub async fn to_be_checked(&self) -> Result<(), AssertionFailure>
pub async fn to_be_editable(&self) -> Result<(), AssertionFailure>
pub async fn to_be_attached(&self) -> Result<(), AssertionFailure>
pub async fn to_be_empty(&self) -> Result<(), AssertionFailure>
pub async fn to_be_focused(&self) -> Result<(), AssertionFailure>
pub async fn to_be_in_viewport(&self) -> Result<(), AssertionFailure>
pub async fn to_be_in_viewport_with( &self, options: InViewportOptions, ) -> Result<(), AssertionFailure>
pub async fn to_have_text( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_contain_text( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_value( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_values( &self, expected: &[impl AsRef<str>], ) -> Result<(), AssertionFailure>
pub async fn to_have_attribute( &self, name: &str, value: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_attribute_exists( &self, name: &str, ) -> Result<(), AssertionFailure>
pub async fn to_have_class( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_contain_class( &self, expected: &str, ) -> Result<(), AssertionFailure>
pub async fn to_have_css( &self, property: &str, value: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_css_with( &self, property: &str, value: impl Into<StringOrRegex>, options: HaveCssOptions, ) -> Result<(), AssertionFailure>
pub async fn to_have_id( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_role( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_accessible_name( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_accessible_description( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_accessible_error_message( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_have_js_property( &self, name: &str, value: Value, ) -> Result<(), AssertionFailure>
pub async fn to_have_texts( &self, expected: &[impl Into<StringOrRegex> + Clone], ) -> Result<(), AssertionFailure>
pub async fn to_contain_texts( &self, expected: &[impl AsRef<str>], ) -> Result<(), AssertionFailure>
pub async fn to_have_count( &self, expected: usize, ) -> Result<(), AssertionFailure>
Source§impl Expect<'_, Arc<Page>>
impl Expect<'_, Arc<Page>>
pub async fn to_have_title( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_contain_title( &self, expected: &str, ) -> Result<(), AssertionFailure>
pub async fn to_have_url( &self, expected: impl Into<StringOrRegex>, ) -> Result<(), AssertionFailure>
pub async fn to_contain_url( &self, expected: &str, ) -> Result<(), AssertionFailure>
Auto Trait Implementations§
impl<'a, T> Freeze for Expect<'a, T>
impl<'a, T> RefUnwindSafe for Expect<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Expect<'a, T>where
T: Sync,
impl<'a, T> Sync for Expect<'a, T>where
T: Sync,
impl<'a, T> Unpin for Expect<'a, T>
impl<'a, T> UnsafeUnpin for Expect<'a, T>
impl<'a, T> UnwindSafe for Expect<'a, T>where
T: RefUnwindSafe,
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