Commit Graph

4 Commits

Author SHA1 Message Date
Sahil Batra
32c1c4bb76 bots: Remove duplicate fields from bot objects in realm_bots.
This commit removes "avatar_url", "bot_type", "email",
"full_name", "is_active" and "owner_id" fields from bot
objects passed in "realm_bots" as user objects in
"realm_users" already has those fields and clients can
get the data needed from it.

Also removes the code to send realm_bot/update events
when changing these fields.
2026-03-03 17:36:43 -08:00
Tim Abbott
c22390217b tests: Derive role boolean flags in make_user/make_bot helpers.
Previously callers needed to manually keep is_admin, is_owner,
is_guest, and is_moderator in sync with the role field. Derive
them automatically from role, matching the production logic in
people._add_user() and user_events.ts. Also export the Role
and Bot constant objects for use by test files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:28:56 -08:00
Dhruv Vira
d4a8b371e5 tests: Use example_user factories in people.test.cjs.
This refactor replaces manual user/bot objects with standardized
factories to ensure type coherence with production data.

Updated web/tests/lib/example_user.cjs to include `is_moderator`
as a default property, as verified via production JS console.
2026-02-16 09:04:43 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00