A platform for community discussion. Free, open, simple.
FIX: Keep composer title and reply when switching to PM (#9851)
Bianca Nenciue31adef32dea
diff --git a/app/assets/javascripts/select-kit/addon/components/composer-actions.js b/app/assets/javascripts/select-kit/addon/components/composer-actions.jsindex adaccf2953c..98cb3fc832c 100644--- a/app/assets/javascripts/select-kit/addon/components/composer-actions.js+++ b/app/assets/javascripts/select-kit/addon/components/composer-actions.js@@ -328,6 +328,7 @@ export default DropdownSelectBoxComponent.extend({this.composerModel.getProperties("draftKey","draftSequence",+ "title","reply","disableScopedCategory"),diff --git a/test/javascripts/acceptance/composer-actions-test.js b/test/javascripts/acceptance/composer-actions-test.jsindex fff2e804f6c..95060ba67a9 100644--- a/test/javascripts/acceptance/composer-actions-test.js+++ b/test/javascripts/acceptance/composer-actions-test.js@@ -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");