mirror of https://github.com/zulip/zulip.git
populate_db: Set owners for bots in development and test database.
Since we do not allow to remove owners from bots, it is better to keep owners for the bots in development environment as well. We need to change puppeteer tests here because now desdemona already has bots in dev server and thus "Active bots" section is opened by default in the settings instead of "Add a new bot" section.
This commit is contained in:
parent
2c664a85fb
commit
947b2b55fe
|
@ -228,6 +228,7 @@ async function test_invalid_edit_bot_form(page: Page): Promise<void> {
|
||||||
|
|
||||||
async function test_your_bots_section(page: Page): Promise<void> {
|
async function test_your_bots_section(page: Page): Promise<void> {
|
||||||
await page.click('[data-section="your-bots"]');
|
await page.click('[data-section="your-bots"]');
|
||||||
|
await page.click(".add-a-new-bot-tab");
|
||||||
await test_webhook_bot_creation(page);
|
await test_webhook_bot_creation(page);
|
||||||
await test_normal_bot_creation(page);
|
await test_normal_bot_creation(page);
|
||||||
await test_botserverrc(page);
|
await test_botserverrc(page);
|
||||||
|
|
|
@ -507,7 +507,9 @@ class Command(BaseCommand):
|
||||||
for i in range(options["extra_bots"]):
|
for i in range(options["extra_bots"]):
|
||||||
zulip_realm_bots.append((f"Extra Bot {i}", f"extrabot{i}@zulip.com"))
|
zulip_realm_bots.append((f"Extra Bot {i}", f"extrabot{i}@zulip.com"))
|
||||||
|
|
||||||
create_users(zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT)
|
create_users(
|
||||||
|
zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT, bot_owner=desdemona
|
||||||
|
)
|
||||||
|
|
||||||
zoe = get_user_by_delivery_email("zoe@zulip.com", zulip_realm)
|
zoe = get_user_by_delivery_email("zoe@zulip.com", zulip_realm)
|
||||||
zulip_webhook_bots = [
|
zulip_webhook_bots = [
|
||||||
|
@ -911,7 +913,10 @@ class Command(BaseCommand):
|
||||||
("Zulip Nagios Bot", "nagios-bot@zulip.com"),
|
("Zulip Nagios Bot", "nagios-bot@zulip.com"),
|
||||||
]
|
]
|
||||||
create_users(
|
create_users(
|
||||||
zulip_realm, internal_zulip_users_nosubs, bot_type=UserProfile.DEFAULT_BOT
|
zulip_realm,
|
||||||
|
internal_zulip_users_nosubs,
|
||||||
|
bot_type=UserProfile.DEFAULT_BOT,
|
||||||
|
bot_owner=desdemona,
|
||||||
)
|
)
|
||||||
|
|
||||||
mark_all_messages_as_read()
|
mark_all_messages_as_read()
|
||||||
|
|
Loading…
Reference in New Issue