test: v0.2.0 locale_factory + ctx_inner alias assertions

Three new TAP cases cover the locale_factory rollout:

- §10 Form-1 bw-compat: display.create(container) wraps the bare
  handle as a constant locale_factory; _test_get_locale returns the
  same handle, _test_get_rows still resolves single-source
  availability via the Form-1 shim.
- §11 Form-2 locale-factory: display.create(function() -> {sources,
  sink}) returns the locale table per frame; a recipe needing two
  templates split across two source-containers reports aggregate
  availability=true.
- §12 ctx_inner propagation: monkey-patching panel.show_context_menu
  captures the entries-table, then invokes the action callback with
  a dummy menu_ctx. Asserts ctx_inner.locale matches the resolved
  locale and ctx_inner.container points at locale.sink (Form-2) or
  the bare handle (Form-1).

Test count grows 9 -> 12. Added a fresh_container helper so the
multi-container fixtures in §11/§12 do not lose recipes via repeated
_test_clear_all calls.

Depends on lib-core.crafting-display v0.2.0 and lib-core.crafting
v0.2.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Calic
2026-06-14 19:43:59 +02:00
parent b88842161c
commit 6f9ceebe66
2 changed files with 163 additions and 7 deletions

View File

@@ -1,11 +1,11 @@
{
"id": "lib-core.crafting-display-test",
"role": "test",
"version": "0.1.0",
"version": "0.2.0",
"api_min": "0.1",
"deps": [
{"id": "lib-core.crafting-display", "version": "0.1.0"},
{"id": "lib-core.crafting", "version": "0.1.0"},
{"id": "lib-core.crafting-display", "version": "0.2.0"},
{"id": "lib-core.crafting", "version": "0.2.0"},
{"id": "lib-core.panel", "version": "0.1.1"},
{"id": "lib-core.inventory-list", "version": "0.1.0"},
{"id": "lib-core.composition", "version": "0.3.0"}