FIX: Keep tags when switching to shared draft
This commit is contained in:
parent
f32de88dfc
commit
a834245683
|
@ -276,6 +276,7 @@ export default DropdownSelectBoxComponent.extend({
|
|||
options.action = action;
|
||||
options.categoryId = this.get("composerModel.categoryId");
|
||||
options.topicTitle = this.get("composerModel.title");
|
||||
options.tags = this.get("composerModel.tags");
|
||||
options.skipDraftCheck = true;
|
||||
this._openComposer(options);
|
||||
},
|
||||
|
|
|
@ -7,6 +7,9 @@ acceptance("Composer Actions", {
|
|||
settings: {
|
||||
enable_whispers: true
|
||||
},
|
||||
site: {
|
||||
can_tag_topics: true
|
||||
},
|
||||
beforeEach() {
|
||||
_clearSnapshots();
|
||||
}
|
||||
|
@ -131,16 +134,21 @@ QUnit.test("shared draft", async assert => {
|
|||
toggleCheckDraftPopup(true);
|
||||
|
||||
const composerActions = selectKit(".composer-actions");
|
||||
const tags = selectKit(".mini-tag-chooser");
|
||||
|
||||
await visit("/");
|
||||
await click("#create-topic");
|
||||
|
||||
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 tags.expand();
|
||||
await tags.selectRowByValue("monkey");
|
||||
|
||||
await composerActions.expand();
|
||||
await composerActions.selectRowByValue("shared_draft");
|
||||
|
||||
assert.equal(tags.header().value(), "monkey", "tags are not reset");
|
||||
|
||||
assert.equal(
|
||||
find("#reply-control .btn-primary.create .d-button-label").text(),
|
||||
I18n.t("composer.create_shared_draft")
|
||||
|
|
Loading…
Reference in New Issue