import React from 'react';
import { mount } from 'enzyme';
import { expect } from 'chai';
import { describe, it, specs } from '../../storybook/facade';
import SidebarNotifications from './index';

export default (stories) => {
	stories.add('SidebarNotifications', () => {
		const data = JSON.parse('[{"id":"4GS1pwMHrOgWmIekIciKE2","type":"New Content","title":"Curious how we determine related signals?","content":"Be sure to check out our latest [blog post](https://docs.pinpt.com/article/how-we-determine-the-relatedness-of-signals) covering this topic. Written by our Data Science team, you can learn more about metric relationships than you ever wanted to know.","read":true,"timestamp":1544991351306}]');

		const component = (
			<div style={{ width: 350, backgroundColor: '#515151' }}>
				<SidebarNotifications
					data={data}
				/>
			</div>
		);

		specs(() => describe('SidebarNotifications', () => {
			const wrapper = mount(component);

			it('Should be ok', () => {
				expect(wrapper).be.ok;
			});
		}));

		return component;
	});
};
