Ensure comments are still visible when stream is closed (#2865)

CORL-938

Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca>
This commit is contained in:
Nick Funk
2020-02-27 22:40:24 +00:00
committed by GitHub
co-authored by Wyatt Johnson
parent 7989f87d02
commit fe8b6535a9
3 changed files with 2 additions and 6 deletions
@@ -167,7 +167,6 @@ export const AllCommentsTabContainer: FunctionComponent<Props> = props => {
></NoComments>
)}
{comments.length > 0 &&
!props.story.isClosed &&
comments.map(comment => (
<IgnoredTombstoneOrHideContainer
key={comment.id}
@@ -173,7 +173,6 @@ export const UnansweredCommentsTabContainer: FunctionComponent<
</Localized>
)}
{comments.length > 0 &&
!props.story.isClosed &&
comments.map(comment => (
<IgnoredTombstoneOrHideContainer
key={comment.id}
@@ -330,7 +330,7 @@ it("handle disabled commenting error", async () => {
it("handle story closed error", async () => {
await act(async () => {
let returnStory = stories[0];
const { rte, form, testRenderer } = await createTestRenderer(
const { rte, form } = await createTestRenderer(
{
Mutation: {
createCommentReply: sinon.stub().callsFake(() => {
@@ -352,8 +352,6 @@ it("handle story closed error", async () => {
// Change the story that we return to be closed.
returnStory = { ...stories[0], isClosed: true };
await waitForElement(() =>
within(testRenderer.root).getByText("Story is closed")
);
await waitForElement(() => within(form).getByText("Story is closed"));
});
});