pub struct FrameAssertion<'a> { /* private fields */ }Expand description
Frame assertion builder (Playwright-style API)
Implementations§
Source§impl<'a> FrameAssertion<'a>
impl<'a> FrameAssertion<'a>
Sourcepub fn soft(self) -> Self
pub fn soft(self) -> Self
Enable soft assertion mode (collect errors instead of failing immediately)
Sourcepub fn to_contain_text(&mut self, text: &str) -> ProbarResult<&mut Self>
pub fn to_contain_text(&mut self, text: &str) -> ProbarResult<&mut Self>
Assert frame contains text
Sourcepub fn not_to_contain_text(&mut self, text: &str) -> ProbarResult<&mut Self>
pub fn not_to_contain_text(&mut self, text: &str) -> ProbarResult<&mut Self>
Assert frame does not contain text
Sourcepub fn to_match(&mut self, pattern: &str) -> ProbarResult<&mut Self>
pub fn to_match(&mut self, pattern: &str) -> ProbarResult<&mut Self>
Assert frame matches regex pattern
Sourcepub fn line_to_contain(
&mut self,
line_num: usize,
text: &str,
) -> ProbarResult<&mut Self>
pub fn line_to_contain( &mut self, line_num: usize, text: &str, ) -> ProbarResult<&mut Self>
Assert specific line contains text
Sourcepub fn line_to_equal(
&mut self,
line_num: usize,
expected: &str,
) -> ProbarResult<&mut Self>
pub fn line_to_equal( &mut self, line_num: usize, expected: &str, ) -> ProbarResult<&mut Self>
Assert specific line equals exact text
Sourcepub fn to_have_size(
&mut self,
width: u16,
height: u16,
) -> ProbarResult<&mut Self>
pub fn to_have_size( &mut self, width: u16, height: u16, ) -> ProbarResult<&mut Self>
Assert frame has expected dimensions
Sourcepub fn to_be_identical_to(
&mut self,
other: &TuiFrame,
) -> ProbarResult<&mut Self>
pub fn to_be_identical_to( &mut self, other: &TuiFrame, ) -> ProbarResult<&mut Self>
Assert frame is identical to another frame
Sourcepub fn finalize(&self) -> ProbarResult<()>
pub fn finalize(&self) -> ProbarResult<()>
Finalize soft assertions and return any collected errors
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FrameAssertion<'a>
impl<'a> RefUnwindSafe for FrameAssertion<'a>
impl<'a> Send for FrameAssertion<'a>
impl<'a> Sync for FrameAssertion<'a>
impl<'a> Unpin for FrameAssertion<'a>
impl<'a> UnsafeUnpin for FrameAssertion<'a>
impl<'a> UnwindSafe for FrameAssertion<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more