diff options
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | examples/todos/src/main.rs | 23 | ||||
-rw-r--r-- | src/lib.rs | 1 |
3 files changed, 11 insertions, 14 deletions
@@ -72,7 +72,6 @@ unconditional-rendering = ["iced_winit/unconditional-rendering"] iced_core.workspace = true iced_futures.workspace = true iced_renderer.workspace = true -iced_test.workspace = true iced_widget.workspace = true iced_winit.features = ["program"] iced_winit.workspace = true diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index ff38c6ce..f4b8d786 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -590,30 +590,29 @@ impl SavedState { mod tests { use super::*; - use iced::test; - use iced::test::selector; + use iced_test::{interface, load_font, selector, Error}; #[test] - fn it_creates_a_new_task() -> Result<(), test::Error> { - test::load_font(Todos::ICON_FONT)?; + fn it_creates_a_new_task() -> Result<(), Error> { + load_font(Todos::ICON_FONT)?; let (mut todos, _command) = Todos::new(); let _command = todos.update(Message::Loaded(Err(LoadError::File))); - let mut interface = test::interface(todos.view()); - let _input = interface.click("new-task")?; + let mut ui = interface(todos.view()); + let _input = ui.click("new-task")?; - interface.typewrite("Create the universe"); - interface.press_key(keyboard::key::Named::Enter); + ui.typewrite("Create the universe"); + ui.press_key(keyboard::key::Named::Enter); - for message in interface.into_messages() { + for message in ui.into_messages() { let _command = todos.update(message); } - let mut interface = test::interface(todos.view()); - let _ = interface.find(selector::text("Create the universe"))?; + let mut ui = interface(todos.view()); + let _ = ui.find(selector::text("Create the universe"))?; - let snapshot = interface.snapshot()?; + let snapshot = ui.snapshot()?; assert!( snapshot.matches_hash("snapshots/creates_a_new_task")?, "snapshots should match!" @@ -479,7 +479,6 @@ use iced_winit::runtime; pub use iced_futures::futures; pub use iced_futures::stream; -pub use iced_test as test; #[cfg(feature = "highlighter")] pub use iced_highlighter as highlighter; |