Skip to content

Craft Anything: understand how any software works, and craft your own.

Rust

Wait for asset facts to load in the asset spending smoke test (#76)

WadahBadawia7fc1f94a412
diff --git a/crates/ui-egui/tests/smoke.rs b/crates/ui-egui/tests/smoke.rs
index 7fc1b6b6..50020806 100644
--- a/crates/ui-egui/tests/smoke.rs
+++ b/crates/ui-egui/tests/smoke.rs
@@ -250,7 +250,7 @@ fn a_game_project_shows_its_asset_spending_and_can_raise_the_budget() {
a.open_workspace(ws);
a
});
- h.run_steps(3);
+ assert!(wait(&mut h, |a| a.facts.assets.0 == 1));
h.get_by_label("1 · $0.51 of $5.00");
// Generated assets are the person's choice, saved with the project through project_assets_allow.
h.get_by_label("Generate custom pictures and models").click();
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index f04aa926..1f48c85b 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -705,8 +705,8 @@ Gaps found while using the app for real projects.
icons, its sections keep their height, so nothing moves when it folds, and a rule takes the
place of each heading, with Refresh and the Pinned arrow still there
- [ ] A prompt brought back with Up keeps its pictures (only the text comes back now)
-- [ ] The smoke test `a_game_project_shows_its_asset_spending_and_can_raise_the_budget` failed
- once in a full run and passed in the next 11: it reads what a worker fills in after 3 frames
+- [x] The smoke test `a_game_project_shows_its_asset_spending_and_can_raise_the_budget` failed
+ once in a full run and passed in the next 11: wait for `a.facts.assets.0 == 1` instead of a fixed frame step
- [x] The prompt box no longer jumps while typing: a frame laid out with its old height is
thrown away and laid out again before it's shown
- [x] A message sent to a project waiting its turn stays in the box instead of being lost