FIX: do no reset tags selection on category selection (#6369)

We will instead implement a server side solution to this in the future.
This commit is contained in:
Joffrey JAFFEUX
2018-09-06 10:35:07 +02:00
committed by GitHub
parent 56b6a4779d
commit 6c1e70d554
3 changed files with 0 additions and 47 deletions

View File

@@ -1,39 +0,0 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("CategoryChooser - with tags", {
loggedIn: true,
site: { can_tag_topics: true },
settings: {
tagging_enabled: true,
allow_uncategorized_topics: false
}
});
QUnit.test("resets tags when changing category", async assert => {
const categoryChooser = selectKit(".category-chooser");
const miniTagChooser = selectKit(".mini-tag-chooser");
const findSelected = () =>
find(".mini-tag-chooser .mini-tag-chooser-header .selected-name").text();
await visit("/");
await click("#create-topic");
await miniTagChooser.expand();
await miniTagChooser.selectRowByValue("monkey");
assert.equal(findSelected(), "monkey");
await categoryChooser.expand();
await categoryChooser.selectRowByValue(6);
assert.equal(findSelected(), "optional tags");
await miniTagChooser.expand();
await miniTagChooser.selectRowByValue("monkey");
assert.equal(findSelected(), "monkey");
await categoryChooser.expand();
await categoryChooser.selectNoneRow();
assert.equal(findSelected(), "optional tags");
});