From 86f7a07ded7f3cc5ae8694c7cc168e6ee3cc271a Mon Sep 17 00:00:00 2001 From: Mehak Nasir Date: Wed, 6 Apr 2022 01:17:59 +0500 Subject: [PATCH] feat: allow anonymous post support is removed from add post section --- src/discussions/posts/post-editor/PostEditor.jsx | 13 ------------- .../posts/post-editor/PostEditor.test.jsx | 8 +++----- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index 23f193de..3ec780f8 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -374,19 +374,6 @@ function PostEditor({ {intl.formatMessage(messages.followPost)} - {allowAnonymous && ( - - - {intl.formatMessage(messages.anonymousPost)} - - - )} {allowAnonymousToPeers && ( diff --git a/src/discussions/posts/post-editor/PostEditor.test.jsx b/src/discussions/posts/post-editor/PostEditor.test.jsx index 9971e138..4d080a7e 100644 --- a/src/discussions/posts/post-editor/PostEditor.test.jsx +++ b/src/discussions/posts/post-editor/PostEditor.test.jsx @@ -117,15 +117,13 @@ describe('PostEditor', () => { .toHaveLength(3); expect(screen.queryByText('cohort', { exact: false })) - .not - .toBeInTheDocument(); + .not.toBeInTheDocument(); if (allowAnonymous) { expect(screen.queryByText('Post anonymously')) - .toBeInTheDocument(); + .not.toBeInTheDocument(); } else { expect(screen.queryByText('Post anonymously')) - .not - .toBeInTheDocument(); + .not.toBeInTheDocument(); } if (allowAnonymousToPeers) { expect(screen.queryByText('Post anonymously to peers'))