diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 10549117..e0c60e94 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -586,10 +586,7 @@ fn presets() -> impl Iterator> [ Preset::new("Empty", || { - ( - Todos::Loading, - Command::done(Message::Loaded(Err(LoadError::File))), - ) + (Todos::Loaded(State::default()), Command::none()) }), Preset::new("Carl Sagan", || { ( diff --git a/examples/todos/tests/carl_sagan.ice b/examples/todos/tests/carl_sagan.ice index 1a1b7f08..cfad7a60 100644 --- a/examples/todos/tests/carl_sagan.ice +++ b/examples/todos/tests/carl_sagan.ice @@ -1,5 +1,5 @@ viewport: 512x768 -mode: impatient +mode: Impatient preset: Empty ----- click at "What needs to be done?" @@ -7,6 +7,8 @@ type "Create the universe" type enter type "Make an apple pie" type enter +expect "2 tasks left" click at "Create the universe" +expect "1 task left" click at "Make an apple pie" expect "0 tasks left" diff --git a/test/src/ice.rs b/test/src/ice.rs index 67037c14..ab1a9c8f 100644 --- a/test/src/ice.rs +++ b/test/src/ice.rs @@ -51,7 +51,7 @@ impl Ice { ); } "mode" => { - mode = Some(match value.trim() { + mode = Some(match value.trim().to_lowercase().as_str() { "patient" => emulator::Mode::Patient, "impatient" => emulator::Mode::Impatient, _ => { @@ -118,8 +118,8 @@ impl std::fmt::Display for Ice { f, "mode: {}", match self.mode { - emulator::Mode::Patient => "patient", - emulator::Mode::Impatient => "impatient", + emulator::Mode::Patient => "Patient", + emulator::Mode::Impatient => "Impatient", } )?;