feat: allow anonymous post support is removed from add post section
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user