diff --git a/crates/ui-egui/src/file_open/tests.rs b/crates/ui-egui/src/file_open/tests.rs index 0e92c23d365..aa14793201a 100644 --- a/crates/ui-egui/src/file_open/tests.rs +++ b/crates/ui-egui/src/file_open/tests.rs @@ -1858,7 +1858,12 @@ fn open_as_smart_object_dialog_opens_one_document_per_selected_file() { assert_eq!(app.session.documents().iter().map(|d| d.doc.name.as_str()).collect::>(), ["one-1", "two-1"]); assert!(app.session.documents().iter().all(|d| d.path.is_none() && d.doc.layers.len() == 1)); - assert!(open_error_messages(&app).iter().any(|message| message.starts_with("Couldn't open bad.png")), "the unreadable file is reported"); + assert_eq!( + open_error_messages(&app), + ["Could not open \"bad.png\" because PhotoCraft does not recognize this type of file."], + "the unreadable file has one exact modal alert; status: {}", + app.ui.status + ); let _ = std::fs::remove_dir_all(&dir); } @@ -1880,7 +1885,12 @@ fn open_as_smart_object_opens_in_the_background_in_name_order() { tick_until(&mut app, &ctx, |app| app.jobs.opens.is_empty()); assert_eq!(app.session.documents().iter().map(|d| d.doc.name.as_str()).collect::>(), ["one-1", "two-1"]); assert!(app.session.documents().iter().all(|d| d.path.is_none() && d.doc.layers.len() == 1)); - assert!(open_error_messages(&app).iter().any(|message| message.starts_with("Couldn't open bad.png")), "the unreadable file is reported"); + assert_eq!( + open_error_messages(&app), + ["Could not open \"bad.png\" because PhotoCraft does not recognize this type of file."], + "the unreadable file has one exact modal alert; status: {}", + app.ui.status + ); let _ = std::fs::remove_dir_all(&dir); }