HomePhabricator
Diffusion Comm ad673e2bd253

[lib] Add unit tests for user-facing permissions to verify the result

Description

[lib] Add unit tests for user-facing permissions to verify the result

Summary:
A couple of unit tests that verifies the permissions from getRolePermissionBlobs for Members match the thread permissions associated with user-surfaced permissions that Members would have. For admins, this verifies that the compilation of all universalCommunityPermissions and thread permissions associated with all user-surfaced permissions matched the permissions blob.

It made the most sense to check the Members for both COMMUNITY_ROOT and COMMUNITY_ANNOUNCEMENT_ROOT, but the Admins permissions blob should remain the same so I only did that once.

Originally brought up in D8380

ENG-4314

Depends on D8445

Test Plan: yarn workspace lib test - all tests pass

Reviewers: atul, ginsu

Reviewed By: atul, ginsu

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8478

Details

Provenance
rohanAuthored on Jul 11 2023, 2:37 PM
Reviewer
atul
Differential Revision
D8478: [lib] Add unit tests for user-facing permissions to verify the result
Parents
rCOMM008a3c5a95cb: [native] Prevent duplicate role names in one community on the client
Branches
Unknown
Tags
Unknown