FIX: Fix delete button for Tag Groups. (#6965)

This commit is contained in:
Bianca Nenciu
2019-02-04 13:46:39 +02:00
committed by Régis Hanol
parent 0337622420
commit e0e91fad87
3 changed files with 42 additions and 1 deletions
@@ -0,0 +1,36 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("Tag Groups", {
loggedIn: true,
settings: { tagging_enabled: true },
pretend(server, helper) {
server.post("/tag_groups", () => {
return helper.response({
tag_group: {
id: 42,
name: "test tag group",
tag_names: ["monkey"],
parent_tag_name: [],
one_per_topic: false,
permissions: { everyone: 1 }
}
});
});
}
});
QUnit.test("tag groups can be saved and deleted", async assert => {
const tags = selectKit(".tag-chooser");
await visit("/tag_groups");
await click(".content-list .btn");
await fillIn(".tag-group-content h1 input", "test tag group");
await tags.expand();
await tags.selectRowByValue("monkey");
await click(".tag-group-content .btn.btn-default");
await click(".tag-chooser .choice:first");
assert.ok(!find(".tag-group-content .btn.btn-danger")[0].disabled);
});