diff --git a/__tests__/src/components/ManifestListItem.test.js b/__tests__/src/components/ManifestListItem.test.js index 9f6d27f36b5a9f4f12609d2c1573e27ec28f75c5..72f183c722c5475f662bbb502e64e50934080eca 100644 --- a/__tests__/src/components/ManifestListItem.test.js +++ b/__tests__/src/components/ManifestListItem.test.js @@ -67,4 +67,16 @@ describe('ManifestListItem', () => { const wrapper = createWrapper(); expect(wrapper.find('.mirador-manifest-list-item-provider').children().text()).toEqual('addedFromUrl'); }); + + it('when clicking a collection fires the showCollectionDialog', () => { + const showCollectionDialog = jest.fn(); + const wrapper = createWrapper({ isCollection: true, showCollectionDialog }); + wrapper.find(ButtonBase).simulate('click'); + expect(showCollectionDialog).toHaveBeenCalledTimes(1); + }); + + it('displays a collection label for collections', () => { + const wrapper = createWrapper({ isCollection: true }); + expect(wrapper.text()).toContain('collectionxyz'); + }); });