FIX: Uncategorized pm not allowing edit (#7276)

This commit is contained in:
Tim Lange
2019-04-02 06:54:53 +02:00
committed by Guo Xiang Tan
parent 4175de5071
commit a9a35d2c19
4 changed files with 280 additions and 1 deletions
@@ -659,6 +659,27 @@ QUnit.test("Loading draft also replaces the recipients", async assert => {
assert.equal(find(".users-input .item:eq(0)").text(), "codinghorror");
});
QUnit.test(
"Deleting the text content of the first post in a private message",
async assert => {
Discourse.SiteSettings.allow_uncategorized_topics = false;
await visit("/t/34");
await click("#post_1 .d-icon-ellipsis-h");
await click("#post_1 .d-icon-pencil-alt");
await fillIn(".d-editor-input", "");
assert.equal(
find(".d-editor-container textarea").attr("placeholder"),
I18n.t("composer.reply_placeholder"),
"it should not block because of missing category"
);
}
);
const assertImageResized = (assert, uploads) => {
assert.equal(
find(".d-editor-input").val(),