ToolJet/server/test
Shantanu Mane c2d8ba08ea
Add invitation token and invite URL generation for external API users and expand test coverage (#16413)
* feat(external-api): return per-workspace inviteUrl in POST /ext/users response

* test(external-api): expand POST /ext/users coverage — roles, multi-group, and failure conditions

Adds 8 new e2e tests covering role assignment, per-workspace role variance,
multiple custom groups, and all key failure paths (duplicate email, missing
workspace, default group in groups field, nonexistent group, end-user/builder
group conflict). Also seeds the builder default group in maybeCreateDefaultGroupPermissions
to unblock role-assignment tests against test orgs.

* test(external-api): clarify conflicting-permissions error shape in users spec

* feat(external-api): update default status to INVITED in user-related DTOs and add defaultOrganizationId field

* feat(external-api): enhance invited user session guard and expand user creation tests for archived status

* feat(external-api): add tests for org-invite URL behavior based on user and workspace status

* feat(external-api): update user status handling and invite URL logic in tests

* feat(external-api): update invite URL logic and OrganizationUser status handling for active users
2026-05-21 00:50:03 +05:30
..
__fixtures__ Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
__mocks__ Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
helpers Add invitation token and invite URL generation for external API users and expand test coverage (#16413) 2026-05-21 00:50:03 +05:30
modules Add invitation token and invite URL generation for external API users and expand test coverage (#16413) 2026-05-21 00:50:03 +05:30
jest-coverage.config.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
jest-e2e.config.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
jest-global-setup.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
jest-retry-setup.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
jest-setup.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
jest-transaction-setup.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
test.helper.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30
tooljet-db-test.helper.ts Chore: Rehabilitate backend test suite (#15740) 2026-04-08 13:09:49 +05:30