diff --git a/app/components/HackerNewsList/HackerNewsList.scss b/app/components/HackerNewsList/HackerNewsList.scss index 454f320..afc075a 100644 --- a/app/components/HackerNewsList/HackerNewsList.scss +++ b/app/components/HackerNewsList/HackerNewsList.scss @@ -6,6 +6,10 @@ } } +.HackerNewsList__noti { + text-align: center; +} + .HackerNewsList__item { margin: 30px 0; } diff --git a/app/components/HackerNewsList/HackerNewsList.spec.jsx b/app/components/HackerNewsList/HackerNewsList.spec.jsx index 39d4545..54ae352 100644 --- a/app/components/HackerNewsList/HackerNewsList.spec.jsx +++ b/app/components/HackerNewsList/HackerNewsList.spec.jsx @@ -40,4 +40,9 @@ describe('', () => { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); + + it('should have .HackerNewsList__noti when have no items', () => { + const wrapper = shallow(); + expect(wrapper.find('.HackerNewsList__noti')).toHaveLength(1); + }); }); diff --git a/app/components/HackerNewsList/HackerNewsList.stories.jsx b/app/components/HackerNewsList/HackerNewsList.stories.jsx index 6d6455a..cf1b07d 100644 --- a/app/components/HackerNewsList/HackerNewsList.stories.jsx +++ b/app/components/HackerNewsList/HackerNewsList.stories.jsx @@ -13,7 +13,9 @@ stories {story()} )) - .add('default', () => ( + .add('fetching data', () => ) + .add('no data', () => ) + .add('with data', () => ( should match snapshot when render default 1`] = ` className="HackerNewsList" > should match snapshot when render default 1`] = ` } } /> +
+ There are no items to show. +
There are no items to show.