pub struct Ice {
    pub viewport: Size,
    pub mode: Mode,
    pub preset: Option<String>,
    pub instructions: Vec<Instruction>,
}Expand description
An end-to-end test for iced applications.
Ice tests encode a certain configuration together with a sequence of instructions. An ice test passes if all the instructions can be executed successfully.
Normally, ice tests are run by an Emulator in continuous
integration pipelines.
Ice tests can be easily run by saving them as .ice files in a folder and simply
calling run. These test files can be recorded by enabling the tester
feature flag in the root crate.
Fields§
§viewport: SizeThe viewport [Size] that must be used for the test.
mode: ModeThe emulator::Mode that must be used for the test.
preset: Option<String>The name of the Preset that must be used for the test.
instructions: Vec<Instruction>The sequence of instructions of the test.
Implementations§
Source§impl Ice
 
impl Ice
Sourcepub fn parse(content: &str) -> Result<Self, ParseError>
 
pub fn parse(content: &str) -> Result<Self, ParseError>
Parses an Ice test from its textual representation.
Here is an example of the Ice test syntax:
viewport: 500x800
mode: Immediate
preset: Empty
-----
click "What needs to be done?"
type "Create the universe"
type enter
type "Make an apple pie"
type enter
expect "2 tasks left"
click "Create the universe"
expect "1 task left"
click "Make an apple pie"
expect "0 tasks left"This syntax is very experimental and extremely likely to change often. For this reason, it is reserved for advanced users that want to early test it.
Currently, in order to use it, you will need to earn the right and prove you understand its experimental nature by reading the code!
Trait Implementations§
impl StructuralPartialEq for Ice
Auto Trait Implementations§
impl Freeze for Ice
impl RefUnwindSafe for Ice
impl Send for Ice
impl Sync for Ice
impl Unpin for Ice
impl UnwindSafe for Ice
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Downcast for Twhere
    T: Any,
 
impl<T> Downcast for Twhere
    T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
 
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
 
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
 
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
 
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
 
impl<T> DowncastSync for T
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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