import {mountWithTheme} from 'sentry-test/enzyme'; import InboxReason from 'app/components/group/inboxBadges/inboxReason'; describe('InboxReason', () => { let inbox; beforeEach(() => { inbox = { reason: 0, date_added: new Date(), reason_details: null, }; }); it('displays new issue inbox reason', () => { const wrapper = mountWithTheme(); expect(wrapper.text()).toBe('New Issue'); }); it('displays time added to inbox', () => { const wrapper = mountWithTheme(); expect(wrapper.find('TimeSince').exists()).toBeTruthy(); }); it('has a tooltip', () => { const wrapper = mountWithTheme(); const tooltip = mountWithTheme(wrapper.find('Tooltip').prop('title')); expect(tooltip.text()).toContain('Mark Reviewed to remove this label'); }); it('has affected user count', () => { const wrapper = mountWithTheme( ); const tooltip = mountWithTheme(wrapper.find('Tooltip').prop('title')); expect(tooltip.text()).toContain('Affected 10 user(s)'); }); });