From d762f00c44fb0778332be5b4dc2ab278195030dc Mon Sep 17 00:00:00 2001 From: medievalshell Date: Thu, 21 May 2026 00:35:03 +0200 Subject: [PATCH] test(catalog): add getNodesByOfferId to useCatalogActions contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `useCatalogActions` filter (useCatalog.ts:1042-1043) destructures and returns `getNodesByOfferId` from the store along with the other action methods. The filter contract test was stale — it asserted 11 keys while the actual filter returns 12. Add `getNodesByOfferId` to the expected keys list and to the fakeStore mock so the assertion matches the live hook output. --- src/hooks/catalog/useCatalog.filters.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/catalog/useCatalog.filters.test.tsx b/src/hooks/catalog/useCatalog.filters.test.tsx index 59b6446..aa257d9d 100644 --- a/src/hooks/catalog/useCatalog.filters.test.tsx +++ b/src/hooks/catalog/useCatalog.filters.test.tsx @@ -63,6 +63,7 @@ const { fakeStore } = vi.hoisted(() => selectCatalogOffer: vi.fn(), getNodeById: vi.fn(), getNodeByName: vi.fn(), + getNodesByOfferId: vi.fn(), getBuilderFurniPlaceableStatus: vi.fn() }; @@ -142,6 +143,7 @@ describe('useCatalog filter contract', () => 'getBuilderFurniPlaceableStatus', 'getNodeById', 'getNodeByName', + 'getNodesByOfferId', 'openCatalogByType', 'openPageById', 'openPageByName',