Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add fields to invites 1. Add roleName and roleDescription to Invite protobuf (rpc.proto) 2. add fields to memberApi.invite 3. send those fields as part of 'invite-received' on invite-api callback * make roleName an Enum of COORDINATOR, MEMBER, BLOCKED * start fixing e2e tests * keep fixing tests * Omit roleName from mapeoManager.addProject (solves a bunch of tests, but may need to regress this) * capitalize roleName in member-api * fix local-peers tests * add project name to members and sync e2e tests This avoid the tests hanging since now we need a project name in order to send an invite * * add roleIdFromName to simplify memberApi.invite * regenerate rpc.js due to formatting issues * various changes * revert Invite.roleName to be a string instead of an enum * add `roleId` again as a param to memberApi.invite. derive roleName as `DEFAULT_CAPABILITIES[roleId]` * on MapeoManager, instead of `Omit` `roleName`, `Pick` desired fields from `Invite` * fix tests do to api changes in memberApi.invite * add `invitorName` to invite * union `Invite` with {invitorName:string} * add `invitorName` to `Invite` protobuf and fix tests * * Make roleName optional in `memberApi.invite`, derive from roleId if not passed * check MEMBER and COORDINATOR ROLE_ID as only valid roleIds * delete `roleIdFromName` from `src/capabilities.js` * Add tests for custom `roleName` and empty `roleName` Also: * Fix typo with wrong ROLE_ID * Change test-e2e/utils.Invite signature to return invite response * revert assertion in `memberApi.invite` to using every available capability instead of only member and coordinator * more descriptive tests text Co-authored-by: Andrew Chou <andrewchou@fastmail.com> * Revert changes on test-e2e/utils.invite Co-authored-by: Andrew Chou <andrewchou@fastmail.com> * Use event listener on invite in `test-e2d/members.js` Co-authored-by: Andrew Chou <andrewchou@fastmail.com> --------- Co-authored-by: Tomás Ciccola <tciccola@digital-democracy.com> Co-authored-by: Andrew Chou <andrewchou@fastmail.com>
- Loading branch information