mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
test(catalog): add getNodesByOfferId to useCatalogActions contract
`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.
This commit is contained in:
@@ -63,6 +63,7 @@ const { fakeStore } = vi.hoisted(() =>
|
|||||||
selectCatalogOffer: vi.fn(),
|
selectCatalogOffer: vi.fn(),
|
||||||
getNodeById: vi.fn(),
|
getNodeById: vi.fn(),
|
||||||
getNodeByName: vi.fn(),
|
getNodeByName: vi.fn(),
|
||||||
|
getNodesByOfferId: vi.fn(),
|
||||||
getBuilderFurniPlaceableStatus: vi.fn()
|
getBuilderFurniPlaceableStatus: vi.fn()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,6 +143,7 @@ describe('useCatalog filter contract', () =>
|
|||||||
'getBuilderFurniPlaceableStatus',
|
'getBuilderFurniPlaceableStatus',
|
||||||
'getNodeById',
|
'getNodeById',
|
||||||
'getNodeByName',
|
'getNodeByName',
|
||||||
|
'getNodesByOfferId',
|
||||||
'openCatalogByType',
|
'openCatalogByType',
|
||||||
'openPageById',
|
'openPageById',
|
||||||
'openPageByName',
|
'openPageByName',
|
||||||
|
|||||||
Reference in New Issue
Block a user