Files
vectorcraft/crates
dotCooCoo 03dd80a887 Tests: menu and Quick Actions rebuild counts run in a process of their own
The menus' key (`state_key`, crates/ui-egui/src/menus/model.rs) holds the
installed plug-ins' revision and the fonts' generation. Both are the whole
process's. In a parallel `cargo test` run, a plug-in that another test
installs moves the revision, the menus are rebuilt, and the new catalog
makes the window build a new keymap, whose address is also in the key, so
the next pass rebuilds them again. `a_key_press_rebuilds_the_menus_once`
then counted those rebuilds on its idle frames ("idle frames keep the
menus", left 4 to 7, right 3 to 5) in 6 of 6 runs of
`cargo test -p vectorcraft-ui-egui --lib -- addons menus i18n`, and
`quick_actions_are_listed_again_only_after_a_change`, whose key holds the
menus' key, failed in the same way in 2 of 2 runs.

In the app these values change only when a plug-in is installed or removed
or the fonts change, and the menus list both, so the rebuild is kept.

- Both tests run through `testing::in_own_process`, as the tests that load
  color profiles do, and wait for the installed fonts' scan, whose end
  moves the fonts' generation, before their first frames.
- `a_new_font_rebuilds_the_menus` adds a font and checks that the menus are
  rebuilt with no input, that Type › Font lists it, and that idle frames
  after that keep the menus.
2026-11-29 19:37:36 -08:00
..
…