From 5af0fde2fdb0b03c5161915e2eadc2977363b9f8 Mon Sep 17 00:00:00 2001 From: Joshua Date: Wed, 23 Sep 2026 11:02:53 -0400 Subject: [PATCH] Assert the crest-tap navigation the strategy wires MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The strategy already computes quest_log_path and board_path and the cards already navigate by them, so no card source needed fixing — what was missing was proof: nothing asserted where a crest tap or the quest log's idle return actually lands. The render harnesses now report the navigation target of a present-plate tap, that an away plate is not tappable and does not navigate, and that the idle return goes back to the strategy-computed board path, so the navigation contract is asserted against the bundle HACS ships instead of read out of the sources. --- frontend/tests/render-party-board.mjs | 40 +++++++-- frontend/tests/render-quest-log.mjs | 59 ++++++++++++ tests/test_panel_cards.py | 124 ++++++++++++++++++++++++-- 3 files changed, 208 insertions(+), 15 deletions(-) create mode 100644 frontend/tests/render-quest-log.mjs diff --git a/frontend/tests/render-party-board.mjs b/frontend/tests/render-party-board.mjs index 6158027..4b0309f 100644 --- a/frontend/tests/render-party-board.mjs +++ b/frontend/tests/render-party-board.mjs @@ -3,10 +3,13 @@ * * Usage: node render-party-board.mjs < spec.json * - * The spec JSON carries {bundle, tag, config, hass}; stdout receives one JSON - * object {plates, html} where plates is the ordered plate list the shadow DOM - * renders (name + present/away/unknown kind). The Python panel tests drive - * this harness so the assertions run against the exact bundle HACS ships. + * The spec JSON carries {bundle, tag, config, hass, url?, click_plate?}; + * stdout receives one JSON object {plates, tappable, location, html} where + * plates is the ordered plate list the shadow DOM renders (name + + * present/away/unknown kind), tappable the plate names rendered as tappable + *