pub struct Harness { /* private fields */ }Expand description
Test harness for interacting with Presentar widgets.
Implementations§
Source§impl Harness
impl Harness
Sourcepub fn click(&mut self, selector: &str) -> &mut Self
pub fn click(&mut self, selector: &str) -> &mut Self
Simulate a click on a widget matching the selector.
Sourcepub fn type_text(&mut self, selector: &str, text: &str) -> &mut Self
pub fn type_text(&mut self, selector: &str, text: &str) -> &mut Self
Simulate typing text into a widget.
Sourcepub fn query(&self, selector: &str) -> Option<&dyn Widget>
pub fn query(&self, selector: &str) -> Option<&dyn Widget>
Query for a widget matching the selector.
Sourcepub fn query_all(&self, selector: &str) -> Vec<&dyn Widget>
pub fn query_all(&self, selector: &str) -> Vec<&dyn Widget>
Query for all widgets matching the selector.
Sourcepub fn assert_exists(&self, selector: &str) -> &Self
pub fn assert_exists(&self, selector: &str) -> &Self
Sourcepub fn assert_not_exists(&self, selector: &str) -> &Self
pub fn assert_not_exists(&self, selector: &str) -> &Self
Sourcepub fn assert_text(&self, selector: &str, expected: &str) -> &Self
pub fn assert_text(&self, selector: &str, expected: &str) -> &Self
Sourcepub fn assert_text_contains(&self, selector: &str, substring: &str) -> &Self
pub fn assert_text_contains(&self, selector: &str, substring: &str) -> &Self
Sourcepub fn assert_count(&self, selector: &str, expected: usize) -> &Self
pub fn assert_count(&self, selector: &str, expected: usize) -> &Self
Auto Trait Implementations§
impl Freeze for Harness
impl !RefUnwindSafe for Harness
impl Send for Harness
impl Sync for Harness
impl Unpin for Harness
impl !UnwindSafe for Harness
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