mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add site setting to show more detailed 404 errors. (#8014)
If the setting is turned on, then the user will receive information about the subject: if it was deleted or requires some special access to a group (only if the group is public). Otherwise, the user will receive a generic #404 error message. For now, this change affects only the topics and categories controller. This commit also tries to refactor some of the code related to error handling. To make error pages more consistent (design-wise), the actual error page will be rendered server-side.
This commit is contained in:
@@ -19,10 +19,7 @@ QUnit.test("Enter without an id", async assert => {
|
||||
QUnit.test("Enter a 404 topic", async assert => {
|
||||
await visit("/t/not-found/404");
|
||||
assert.ok(!exists("#topic"), "The topic was not rendered");
|
||||
assert.ok(
|
||||
find(".not-found").text() === "not found",
|
||||
"it renders the error message"
|
||||
);
|
||||
assert.ok(exists(".topic-error"), "An error message is displayed");
|
||||
});
|
||||
|
||||
QUnit.test("Enter without access", async assert => {
|
||||
|
||||
Reference in New Issue
Block a user