mirror of https://github.com/zulip/zulip.git
upload: Simplify the query for the "send_button".
This commit is contained in:
parent
cbd4aad0a5
commit
c959ac5849
|
@ -73,9 +73,7 @@ export function get_item(key, config, file_id) {
|
|||
case "textarea":
|
||||
return $(`#edit_form_${CSS.escape(config.row)} .message_edit_content`);
|
||||
case "send_button":
|
||||
return $(`#edit_form_${CSS.escape(config.row)} .message_edit_content`)
|
||||
.closest(".message_edit_form")
|
||||
.find(".message_edit_save");
|
||||
return $(`#edit_form_${CSS.escape(config.row)}`).find(".message_edit_save");
|
||||
case "banner_container":
|
||||
return $(`#edit_form_${CSS.escape(config.row)} .edit_form_banners`);
|
||||
case "upload_banner_identifier":
|
||||
|
|
|
@ -73,10 +73,10 @@ test("get_item", () => {
|
|||
$(`#edit_form_${CSS.escape(1)} .message_edit_content`),
|
||||
);
|
||||
|
||||
$(`#edit_form_${CSS.escape(2)} .message_edit_content`).closest = () => {
|
||||
$(".message_edit_form").set_find_results(".message_edit_save", $(".message_edit_save"));
|
||||
return $(".message_edit_form");
|
||||
};
|
||||
$(`#edit_form_${CSS.escape(2)}`).set_find_results(
|
||||
".message_edit_save",
|
||||
$(".message_edit_save"),
|
||||
);
|
||||
assert.equal(upload.get_item("send_button", {mode: "edit", row: 2}), $(".message_edit_save"));
|
||||
|
||||
assert.equal(
|
||||
|
|
Loading…
Reference in New Issue