Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Remove test case for snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerDev committed Apr 29, 2019
1 parent e3fa852 commit 4b9e817
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
22 changes: 1 addition & 21 deletions components/post_view/post_list.test.jsx
Expand Up @@ -155,31 +155,11 @@ describe('PostList', () => {
});

describe('onItemsRendered', () => {
test('should set state atBottom when not visibleStopIndex is not 0', async () => {
test('should set state atBottom false when visibleStopIndex is not 0', async () => {
const wrapper = shallow(<PostList {...baseProps}/>);
wrapper.setState({atBottom: true});
wrapper.instance().onItemsRendered({visibleStartIndex: 4, visibleStopIndex: 1});
expect(wrapper.state('atBottom')).toEqual(false);
});
});

describe('store snapshot values on change of props for correcting scroll', () => {
test('Should call scrollTo when posts are added at the top', async () => {
const wrapper = shallow(<PostList {...baseProps}/>);
wrapper.instance().postlistRef = {
current: {
scrollTop: 1000,
scrollHeight: 4000,
},
};
wrapper.setProps({postListIds: [
'post1',
'post2',
'post3',
'post4',
DATE_LINE + 1551711600000,
]});
wrapper.update();
});
});
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
"react-select": "2.4.2",
"react-transition-group": "2.7.1",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "github:mattermost/react-window#0f48e06e6ee3a45559debef72d357b7aea811fc2",
"react-window": "github:mattermost/react-window#587e3e9cc5801aef7a10dbe1e664a492efa672f2",
"rebound": "0.1.0",
"redux": "4.0.1",
"redux-batched-actions": "0.4.1",
Expand Down

0 comments on commit 4b9e817

Please sign in to comment.