Merge pull request #9856 from dotCooCoo/fix/retype-progress-window-clock

Tests: the Retype progress window test holds the app's clock still
This commit is contained in:
.CooCoo authored and GitHub committed 2026-11-27 22:18:07 -08:00
commit 950e5e99a6
1 file changed
+3 -1
+3 -1
View File
@@ -98,12 +98,14 @@ fn cancel_changes_nothing() {
#[test]
fn the_progress_window_shows_a_search() {
let (mut app, _) = outlined();
// The app's clock stands still: the search is only old enough for its window when made so.
app.now_override = Some(0.0);
let ctx = crate::testing::ui_context();
let before = undos(&app);
crate::menus::invoke(&mut app, "type.retype", json!({}));
assert!(app.retype_runs.running.is_some());
assert!(!progress(&mut app, &ctx, 0.0).contains("Finding matching fonts"), "not before the delay");
// The delay counts on the monotonic clock: the search started that long ago.
// The delay counts on the app's clock: the search started that long ago.
if let Some(r) = app.retype_runs.running.as_mut() {
r.started -= DELAY;
}