mirror of
https://github.com/wassname/talk.git
synced 2026-07-18 12:40:13 +08:00
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:
co-authored by
Wyatt Johnson
parent
7989f87d02
commit
fe8b6535a9
@@ -167,7 +167,6 @@ export const AllCommentsTabContainer: FunctionComponent<Props> = props => {
|
||||
></NoComments>
|
||||
)}
|
||||
{comments.length > 0 &&
|
||||
!props.story.isClosed &&
|
||||
comments.map(comment => (
|
||||
<IgnoredTombstoneOrHideContainer
|
||||
key={comment.id}
|
||||
|
||||
-1
@@ -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"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user