openpencil/apps
Fini 7cf66af316 test(ai): icon name resolution coverage for element builders (21 cases)
Guards against builders hardcoding icon names that don't resolve at
runtime — a regression would render as an empty glyph or fallback
circle on canvas, silent-but-broken.

Three layers:

1. Per-builder (17 tests): collect every icon_font iconFontName
   from default output, assert lookupIconByName resolves each. Fail
   message names the specific builder + unresolved slugs.

2. Aggregate (2 tests): full cross-builder icon vocabulary resolves
   at runtime; icon set is non-trivial (≥10 distinct icons).

3. Invariants (2 tests): text-only builders emit zero icons;
   every icon_font node has iconFontFamily='lucide' (prevents a
   regression to a font-family the renderer doesn't bundle).

Note: uses lookupIconByName (not AVAILABLE_LUCIDE_ICONS directly)
because the dictionary has prefix/substring fallbacks that resolve
common names ("home", "more-vertical") even when the literal slug
isn't in the exported list. The lookup is the authoritative runtime
resolver, so matching its behavior is correct.
2026-04-22 02:07:17 +08:00
..
cli chore(release): bump to v0.7.4 2026-04-17 19:20:19 +08:00
desktop test(electron): unblock desktop/git tests on git 2.36 + stubbed electron 2026-04-20 01:22:28 +08:00
web test(ai): icon name resolution coverage for element builders (21 cases) 2026-04-22 02:07:17 +08:00