diff --git a/app/components/post/post.js b/app/components/post/post.js
index 1afd68ce4..d008271aa 100644
--- a/app/components/post/post.js
+++ b/app/components/post/post.js
@@ -254,6 +254,7 @@ export default class Post extends PureComponent {
isLandscape,
previousPostExists,
beforePrevPostUserId,
+ isFirstReply,
} = this.props;
if (!post) {
@@ -305,6 +306,7 @@ export default class Post extends PureComponent {
theme={theme}
previousPostExists={previousPostExists}
beforePrevPostUserId={beforePrevPostUserId}
+ isFirstReply={isFirstReply}
/>
);
}
diff --git a/app/components/post_header/__snapshots__/post_header.test.js.snap b/app/components/post_header/__snapshots__/post_header.test.js.snap
index c37b24749..73b3b3730 100644
--- a/app/components/post_header/__snapshots__/post_header.test.js.snap
+++ b/app/components/post_header/__snapshots__/post_header.test.js.snap
@@ -244,6 +244,76 @@ exports[`PostHeader should match snapshot when post is from system message 1`] =
`;
+exports[`PostHeader should match snapshot when post is same thread, so dont display Commented On 1`] = `
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+`;
+
exports[`PostHeader should match snapshot when post isBot and shouldRenderReplyButton 1`] = `
`;
+exports[`PostHeader should match snapshot when post renders Commented On for new post 1`] = `
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+
+`;
+
exports[`PostHeader should match snapshot when post should display reply button 1`] = `
{
post: {id: 'post'},
beforePrevPostUserId: '0',
onPress: jest.fn(),
+ isFirstReply: true,
};
test('should match snapshot when just a base post', () => {
@@ -95,4 +96,34 @@ describe('PostHeader', () => {
expect(wrapper.getElement()).toMatchSnapshot();
expect(wrapper.find('#ReplyIcon').exists()).toEqual(false);
});
+
+ test('should match snapshot when post renders Commented On for new post', () => {
+ const props = {
+ ...baseProps,
+ isFirstReply: true,
+ renderReplies: true,
+ commentedOnDisplayName: 'John Doe',
+ previousPostExists: true,
+ };
+
+ const wrapper = shallow(
+
+ );
+ expect(wrapper.getElement()).toMatchSnapshot();
+ });
+
+ test('should match snapshot when post is same thread, so dont display Commented On', () => {
+ const props = {
+ ...baseProps,
+ isFirstReply: false,
+ renderReplies: true,
+ commentedOnDisplayName: 'John Doe',
+ previousPostExists: true,
+ };
+
+ const wrapper = shallow(
+
+ );
+ expect(wrapper.getElement()).toMatchSnapshot();
+ });
});
\ No newline at end of file