/** * External dependencies */ import { Button } from '@wordpress/components'; import Gridicon from 'gridicons'; import { shallow } from 'enzyme'; import moment from 'moment'; /** * Internal dependencies */ import { ActivityCard } from '../'; import { Gravatar } from '@woocommerce/components'; describe( 'ActivityCard', () => { test( 'should have correct title', () => { const card = ( This card has some content ); expect( card.props.title ).toBe( 'Inbox message' ); } ); test( 'should render a basic card', () => { const card = shallow( This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render an unread bubble on a card', () => { const card = shallow( This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render a custom icon on a card', () => { const card = shallow( } > This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render a gravatar on a card', () => { const card = shallow( } > This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render a timestamp on a card', () => { // We're generating this via moment to ensure it's always "3 days ago". const threeDaysAgo = moment() .subtract( 3, 'days' ) .format(); const card = shallow( This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render an action on a card', () => { const noop = () => {}; const card = shallow( Action } > This card has some content ); expect( card ).toMatchSnapshot(); } ); test( 'should render multiple actions on a card', () => { const noop = () => {}; const card = shallow( Action 1 , , ] } > This card has some content ); expect( card ).toMatchSnapshot(); } ); } );