mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 05:22:43 +08:00
FIX: Keep tags when switching to shared draft
This commit is contained in:
@ -276,6 +276,7 @@ export default DropdownSelectBoxComponent.extend({
|
|||||||
options.action = action;
|
options.action = action;
|
||||||
options.categoryId = this.get("composerModel.categoryId");
|
options.categoryId = this.get("composerModel.categoryId");
|
||||||
options.topicTitle = this.get("composerModel.title");
|
options.topicTitle = this.get("composerModel.title");
|
||||||
|
options.tags = this.get("composerModel.tags");
|
||||||
options.skipDraftCheck = true;
|
options.skipDraftCheck = true;
|
||||||
this._openComposer(options);
|
this._openComposer(options);
|
||||||
},
|
},
|
||||||
|
@ -7,6 +7,9 @@ acceptance("Composer Actions", {
|
|||||||
settings: {
|
settings: {
|
||||||
enable_whispers: true
|
enable_whispers: true
|
||||||
},
|
},
|
||||||
|
site: {
|
||||||
|
can_tag_topics: true
|
||||||
|
},
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
_clearSnapshots();
|
_clearSnapshots();
|
||||||
}
|
}
|
||||||
@ -131,16 +134,21 @@ QUnit.test("shared draft", async assert => {
|
|||||||
toggleCheckDraftPopup(true);
|
toggleCheckDraftPopup(true);
|
||||||
|
|
||||||
const composerActions = selectKit(".composer-actions");
|
const composerActions = selectKit(".composer-actions");
|
||||||
|
const tags = selectKit(".mini-tag-chooser");
|
||||||
|
|
||||||
await visit("/");
|
await visit("/");
|
||||||
await click("#create-topic");
|
await click("#create-topic");
|
||||||
|
|
||||||
await fillIn("#reply-title", "This is the new text for the title");
|
await fillIn("#reply-title", "This is the new text for the title");
|
||||||
await fillIn(".d-editor-input", "This is the new text for the post");
|
await fillIn(".d-editor-input", "This is the new text for the post");
|
||||||
|
await tags.expand();
|
||||||
|
await tags.selectRowByValue("monkey");
|
||||||
|
|
||||||
await composerActions.expand();
|
await composerActions.expand();
|
||||||
await composerActions.selectRowByValue("shared_draft");
|
await composerActions.selectRowByValue("shared_draft");
|
||||||
|
|
||||||
|
assert.equal(tags.header().value(), "monkey", "tags are not reset");
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
find("#reply-control .btn-primary.create .d-button-label").text(),
|
find("#reply-control .btn-primary.create .d-button-label").text(),
|
||||||
I18n.t("composer.create_shared_draft")
|
I18n.t("composer.create_shared_draft")
|
||||||
|
Reference in New Issue
Block a user