compose: Change stream field in composebox to be a dropdown.

Fixes #11832

This lets the user see more options than the three that appear
in the typeahead menu, and prevents them from inputting invalid
stream names.

This change replaces the input field with the dropdown, and
updates everything that referred to the classnames of the old
input field, so that they now get the data they need from the
new dropdown.
This commit is contained in:
evykassirer
2022-10-20 15:44:55 -07:00
committed by Tim Abbott
parent 429f23fc4f
commit 8a2455a294
25 changed files with 381 additions and 169 deletions

View File

@@ -35,8 +35,8 @@ async function create_stream_message_draft(page: Page): Promise<void> {
console.log("Creating stream message draft");
await page.keyboard.press("KeyC");
await page.waitForSelector("#compose-stream-recipient", {visible: true});
await common.select_item_via_dropdown(page, "#compose_select_stream_widget", "Denmark");
await common.fill_form(page, "form#send_message_form", {
stream_message_recipient_stream: "Denmark",
stream_message_recipient_topic: "tests",
content: "Test stream message.",
});
@@ -129,8 +129,8 @@ async function test_restore_message_draft_via_draft_overlay(page: Page): Promise
}
async function edit_stream_message_draft(page: Page): Promise<void> {
await common.select_item_via_dropdown(page, "#compose_select_stream_widget", "Denmark");
await common.fill_form(page, "form#send_message_form", {
stream_message_recipient_stream: "Denmark",
stream_message_recipient_topic: "tests",
content: "Updated stream message",
});