mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Fixed edit category description redirecting without saving (#7192)
This commit is contained in:
@@ -40,6 +40,21 @@ QUnit.test("Editing the category", async assert => {
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("Edit the description without loosing progress", async assert => {
|
||||
let win = { focus: function() {} };
|
||||
let windowOpen = sandbox.stub(window, "open").returns(win);
|
||||
sandbox.stub(win, "focus");
|
||||
|
||||
await visit("/c/bug");
|
||||
|
||||
await click(".edit-category");
|
||||
await click(".edit-category-description");
|
||||
assert.ok(
|
||||
windowOpen.calledWith("/t/category-definition-for-bug/2", "_blank"),
|
||||
"opens the category topic in a new tab"
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("Error Saving", async assert => {
|
||||
await visit("/c/bug");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user