Write documentation for iced_test

This commit is contained in:
Héctor Ramón Jiménez 2024-12-17 04:13:19 +01:00
parent 8f6f5c13b0
commit 5220a064c5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 189 additions and 13 deletions

View file

@ -591,7 +591,8 @@ mod tests {
use super::*;
use iced::{Settings, Theme};
use iced_test::{selector, Error, Simulator};
use iced_test::selector::text;
use iced_test::{Error, Simulator};
fn simulator(todos: &Todos) -> Simulator<Message> {
Simulator::with_settings(
@ -619,7 +620,7 @@ mod tests {
}
let mut ui = simulator(&todos);
let _ = ui.find(selector::text("Create the universe"))?;
let _ = ui.find(text("Create the universe"))?;
let snapshot = ui.snapshot(&Theme::Dark)?;
assert!(