diff --git a/src/views/preview/comment/compose-comment.jsx b/src/views/preview/comment/compose-comment.jsx index ac38d39b7..46be968fe 100644 --- a/src/views/preview/comment/compose-comment.jsx +++ b/src/views/preview/comment/compose-comment.jsx @@ -240,7 +240,7 @@ class ComposeComment extends React.Component { render () { return ( - {(this.isMuted() && !this.props.isReply) ? ( + {(this.isMuted() && !(this.props.isReply && this.state.status !== ComposeStatus.REJECTED_MUTE)) ? (

diff --git a/test/unit/components/compose-comment.test.jsx b/test/unit/components/compose-comment.test.jsx index 0da7374d7..c57cffb75 100644 --- a/test/unit/components/compose-comment.test.jsx +++ b/test/unit/components/compose-comment.test.jsx @@ -173,6 +173,27 @@ describe('Compose Comment test', () => { global.Date.now = realDateNow; }); + test('Comment Status shows when user just submitted a reply comment that got them muted', () => { + const realDateNow = Date.now.bind(global.Date); + global.Date.now = () => 0; + const component = getComposeCommentWrapper({isReply: true}); + const commentInstance = component.instance(); + commentInstance.setState({ + status: 'REJECTED_MUTE', + muteExpiresAtMs: 100 + }); + component.update(); + expect(component.find('FlexRow.compose-comment').exists()).toEqual(true); + expect(component.find('MuteModal').exists()).toEqual(false); + expect(component.find('CommentingStatus').exists()).toEqual(true); + // Compose box exists but is disabled + expect(component.find('InplaceInput.compose-input').exists()).toEqual(true); + expect(component.find('InplaceInput.compose-input').props().disabled).toBe(true); + expect(component.find('Button.compose-post').props().disabled).toBe(true); + expect(component.find('Button.compose-cancel').props().disabled).toBe(true); + global.Date.now = realDateNow; + }); + test('Comment Status shows when user just submitted a comment that got them muted', () => { const realDateNow = Date.now.bind(global.Date); global.Date.now = () => 0;