diff --git a/app/components/post_list/post_list_base.js b/app/components/post_list/post_list_base.js
index 47973de0d..5ccf6723d 100644
--- a/app/components/post_list/post_list_base.js
+++ b/app/components/post_list/post_list_base.js
@@ -35,7 +35,7 @@ export default class PostListBase extends PureComponent {
onPostPress: PropTypes.func,
onRefresh: PropTypes.func,
postIds: PropTypes.array.isRequired,
- renderFooter: PropTypes.func,
+ renderFooter: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
renderReplies: PropTypes.bool,
serverURL: PropTypes.string.isRequired,
shouldRenderReplyButton: PropTypes.bool,
diff --git a/app/screens/thread/__snapshots__/thread.test.js.snap b/app/screens/thread/__snapshots__/thread.test.js.snap
index e78b7839e..79f7f0539 100644
--- a/app/screens/thread/__snapshots__/thread.test.js.snap
+++ b/app/screens/thread/__snapshots__/thread.test.js.snap
@@ -46,7 +46,13 @@ exports[`thread should match snapshot, has root post 1`] = `
"post_id_2",
]
}
- renderFooter={[Function]}
+ renderFooter={
+
+ }
/>
-`;
-
-exports[`thread should match snapshot, render footer 2`] = `null`;
-
-exports[`thread should match snapshot, render footer 3`] = `
-
+ }
/>
`;
+
+exports[`thread should match snapshot, render footer 2`] = `
+
+`;
+
+exports[`thread should match snapshot, render footer 3`] = `
+
+
+
+
+
+
+`;
diff --git a/app/screens/thread/thread.js b/app/screens/thread/thread.js
index ee568d1b7..1f8dc0445 100644
--- a/app/screens/thread/thread.js
+++ b/app/screens/thread/thread.js
@@ -139,7 +139,7 @@ export default class Thread extends PureComponent {
if (this.hasRootPost()) {
content = (
{
);
// return loading
- expect(wrapper.instance().renderFooter()).toMatchSnapshot();
+ expect(wrapper.find(PostList).getElement()).toMatchSnapshot();
// return null
wrapper.setProps({threadLoadingStatus: {status: RequestStatus.SUCCESS}});
- expect(wrapper.instance().renderFooter()).toMatchSnapshot();
+ expect(wrapper.find(PostList).getElement()).toMatchSnapshot();
// return deleted post
const newPostIds = ['post_id_1', 'post_id_2'];
wrapper.setProps({postIds: newPostIds});
- expect(wrapper.instance().renderFooter()).toMatchSnapshot();
+ expect(wrapper.getElement()).toMatchSnapshot();
});
});