Revert "UX: Don't reload page after saving settings when editing category."

This reverts commit dd142eec03.

We need a fully reload when reordering.
This commit is contained in:
Guo Xiang Tan
2019-03-22 13:10:20 +08:00
parent 2d34be24be
commit 7aab7e9062
2 changed files with 21 additions and 39 deletions
@@ -3,17 +3,7 @@ import { acceptance } from "helpers/qunit-helpers";
acceptance("Category Edit", {
loggedIn: true,
settings: { email_in: true },
pretend(server, helper) {
server.post("/categories", () => {
return helper.response({
category: {
slug: "bug",
id: 999
}
});
});
}
settings: { email_in: true }
});
QUnit.test("Can open the category modal", async assert => {
@@ -28,25 +18,21 @@ QUnit.test("Can open the category modal", async assert => {
QUnit.test("Editing the category", async assert => {
await visit("/c/bug");
await click(".edit-category");
await click(".edit-category-settings a");
await click(".edit-category");
await fillIn("#edit-text-color", "#ff0000");
await click(".edit-category-topic-template");
await fillIn(".d-editor-input", "this is the new topic template");
await click(".edit-category-settings");
const searchPriorityChooser = selectKit("#category-search-priority");
await searchPriorityChooser.expand();
await searchPriorityChooser.selectRowByValue(1);
await click("#save-category");
assert.ok(visible(".d-modal"), "it does not close the modal");
await click(".edit-category-general a");
await fillIn("#edit-text-color", "#ff0000");
await click(".edit-category-topic-template a");
await fillIn(".d-editor-input", "this is the new topic template");
await click("#save-category");
assert.ok(!visible(".d-modal"), "it closes the modal");
assert.equal(
DiscourseURL.redirectedTo,
"/c/bug",