feat: allow anonymous post support is removed from add post section

This commit is contained in:
Mehak Nasir
2022-04-06 01:17:59 +05:00
committed by Mehak Nasir
parent 4be926d788
commit 86f7a07ded
2 changed files with 3 additions and 18 deletions

View File

@@ -374,19 +374,6 @@ function PostEditor({
{intl.formatMessage(messages.followPost)}
</Form.Checkbox>
</Form.Group>
{allowAnonymous && (
<Form.Group>
<Form.Checkbox
name="anonymous"
checked={values.anonymous}
onChange={handleChange}
onBlur={handleBlur}
className="mr-4"
>
{intl.formatMessage(messages.anonymousPost)}
</Form.Checkbox>
</Form.Group>
)}
{allowAnonymousToPeers
&& (
<Form.Group>

View File

@@ -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'))