mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-28 09:21:55 +01:00
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:
1 file changed
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user