describe('unread status', () => { it('does not have class `notification-status`', () => { expect(wrapper.find('.notification-status').exists()).toBe(false) }) it('clicking on a Post link emits `markNotificationAsRead`', () => { wrapper.find('a.notification-mention-post').trigger('click') expect(wrapper.emitted().markNotificationAsRead[0][0]).toEqual(postNotification.from.id) }) it('adds class `notification-status` when read is true', () => { postNotification.read = true wrapper = Wrapper() expect(wrapper.find('.notification-status').exists()).toBe(true) }) })
expect(wrapper.find('img').exists()).toBe(false) }) expect(wrapper.find(BaseIcon).exists()).toBe(true) }) propsData = { user: { name: null } } wrapper = Wrapper() expect(wrapper.find(BaseIcon).exists()).toBe(true) }) }) propsData = { user: { name: 'Anonymous' } } wrapper = Wrapper() expect(wrapper.find(BaseIcon).exists()).toBe(true) }) })