mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test(smoke): cover the binding picker
git grep _bindingCandidates -- test/ demo/ was empty: the function that decides what the user is offered under Add had no test and no smoke. Tombstones were covered from every side, the list they filter was never asked. That is how #262 reached us through a user report instead of a gate — smoke_hidden_flag assigns binding straight into _markerDialog and bypasses the picker entirely. Twelve checks against the real bundle: a deleted device is offered again, a deleted plain entity is offered again behind the checkbox, the checkbox itself is the trap (a device entity is absent with it off, present with it on, and it starts off for a new marker), a placed binding is not duplicated, and re-adding replaces the tombstone and leaves the picker. The twelfth pins the known defect #262 as current behaviour: a device tombstone still hides its child entities. Fixing it turns the check red and forces it to be flipped, so the fix cannot pass the coverage by. smoke-links registers only the pure tombstone helpers. The picker names itself and is found by direct match; the helpers are not named anywhere in the scenario. Verified by probe: touching src/devices.ts alone selects this smoke as a registered link, and without the entry nothing would select it. Issue: #263 User-Visible: no
This commit is contained in:
@@ -27,6 +27,19 @@
|
||||
|
||||
/** @type {SmokeLink[]} */
|
||||
export const SMOKE_LINKS = [
|
||||
{
|
||||
// #263: пикер называет себя (`_bindingCandidates`) и потому находится
|
||||
// прямым совпадением. Регистрируются только чистые помощники надгробий:
|
||||
// смок не произносит ни одного их имени — он видит лишь список, который
|
||||
// они отфильтровали. Проверено зондом: правка одного `src/devices.ts` без
|
||||
// этой записи не выбирает ни одного смока.
|
||||
symbols: ['removedPlanBindings', 'isRemovedPlanEntity', 'deletePlanMarkerRecords'],
|
||||
smokes: ['smoke_binding_picker.mjs'],
|
||||
because: 'смок проверяет, что удалённая привязка снова предлагается в списке «Добавить», '
|
||||
+ 'что отдельные сущности устройств живут за галкой и что надгробие устройства '
|
||||
+ 'по-прежнему прячет его дочерние сущности (#262) — всё это следствия фильтров '
|
||||
+ 'надгробий, чьи имена в браузерный сценарий не попадают',
|
||||
},
|
||||
{
|
||||
// #258: the browser sees only the resulting path/caches; it cannot call
|
||||
// the pure identity helpers by name through the production bundle.
|
||||
|
||||
Reference in New Issue
Block a user