pub struct ScreenshotMatcherOptions {
pub threshold: Option<f64>,
pub max_diff_pixels: Option<u64>,
pub max_diff_pixel_ratio: Option<f64>,
pub mask_color: Option<String>,
pub animations: Option<String>,
pub caret: Option<String>,
pub scale: Option<String>,
pub style_path: Option<PathBuf>,
pub clip: Option<ScreenshotClip>,
pub mask: Vec<String>,
pub ignore: bool,
}Expand description
Options for expect(locator|page).toHaveScreenshot().
Mirrors Playwright’s LocatorAssertions.toHaveScreenshot /
PageAssertions.toHaveScreenshot option bag. Lives in the test
crate because the underlying screenshot pipeline reads
TestInfo.snapshot_dir and writes baseline PNGs.
Fields§
§threshold: Option<f64>§max_diff_pixels: Option<u64>§max_diff_pixel_ratio: Option<f64>§mask_color: Option<String>§animations: Option<String>§caret: Option<String>§scale: Option<String>§style_path: Option<PathBuf>§clip: Option<ScreenshotClip>§mask: Vec<String>§ignore: boolTrait Implementations§
Source§impl Clone for ScreenshotMatcherOptions
impl Clone for ScreenshotMatcherOptions
Source§fn clone(&self) -> ScreenshotMatcherOptions
fn clone(&self) -> ScreenshotMatcherOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScreenshotMatcherOptions
impl Debug for ScreenshotMatcherOptions
Source§impl Default for ScreenshotMatcherOptions
impl Default for ScreenshotMatcherOptions
Source§fn default() -> ScreenshotMatcherOptions
fn default() -> ScreenshotMatcherOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScreenshotMatcherOptions
impl RefUnwindSafe for ScreenshotMatcherOptions
impl Send for ScreenshotMatcherOptions
impl Sync for ScreenshotMatcherOptions
impl Unpin for ScreenshotMatcherOptions
impl UnsafeUnpin for ScreenshotMatcherOptions
impl UnwindSafe for ScreenshotMatcherOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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