ConnectApiHelperTest: "Context user does not have permission to create rich text in feed"

Open
#32 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
api, testing

Research direction

Start with ConnectApiHelperTest.testCreateInputFromBody at line 257 and the ConnectApi.ChatterFeeds.postFeedElement failure shown in the report. Reproduce the unit test with the reported context user, inspect how Network.getNetworkId() behaves in that context, and determine which permission or test setup is required for the test to complete successfully.

Written by the indexing model from the issue text.

Description

I installed the software from UnofficialSF.com and when running unit tests, got this error

Class.ConnectApi.ChatterFeeds.postFeedElement: line 1458, column 1
Class.ConnectApiHelperTest.testCreateInputFromBody: line 257, column 1
10:18:52.130 (194554713)|FATAL_ERROR|ConnectApi.ConnectApiException: Context user does not have permission to create rich text in feed

The ContextUser is UserInfo.getUserId() - which is me, user with System Admin profile. The test appears to be posting a bolded element.

test class is V47

Network.getNetworkId() returns null for the test context

What permission to I need to setup for the running user to be able to execute this unit test?

Dominant language
Apex
Stars
105
Forks
81
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from forcedotcom/ConnectApiHelper

All issues in forcedotcom/ConnectApiHelper

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.