FIX: Keep composer title and reply when switching to PM (#9851)

This commit is contained in:
Bianca Nenciu 2020-05-25 08:46:02 +03:00 committed by GitHub
parent 32d13ab97f
commit e31adef32d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -328,6 +328,7 @@ export default DropdownSelectBoxComponent.extend({
this.composerModel.getProperties(
"draftKey",
"draftSequence",
"title",
"reply",
"disableScopedCategory"
),

View File

@ -19,6 +19,24 @@ acceptance("Composer Actions", {
}
});
QUnit.test(
"creating new topic and then reply_as_private_message keeps attributes",
async assert => {
await visit("/");
await click("button#create-topic");
await fillIn("#reply-title", "this is the title");
await fillIn(".d-editor-input", "this is the reply");
const composerActions = selectKit(".composer-actions");
await composerActions.expand();
await composerActions.selectRowByValue("reply_as_private_message");
assert.ok(find("#reply-title").val(), "this is the title");
assert.ok(find(".d-editor-input").val(), "this is the reply");
}
);
QUnit.test("replying to post", async assert => {
const composerActions = selectKit(".composer-actions");