mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
FIX: Correct urls to account for subfolder setup (#24941)
This commit is contained in:
parent
ecdad60e47
commit
e24c015b9c
@ -1,4 +1,4 @@
|
||||
<a href="/tags">
|
||||
<a class="tag-groups--back" href={{get-url "/tags"}}>
|
||||
{{d-icon "chevron-left"}}
|
||||
<span>{{i18n "tagging.groups.back_btn"}}</span>
|
||||
</a>
|
||||
|
@ -6,22 +6,27 @@ import {
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import { setPrefix } from "discourse-common/lib/get-url";
|
||||
|
||||
acceptance("Tag Groups", function (needs) {
|
||||
needs.user();
|
||||
needs.settings({ tagging_enabled: true });
|
||||
needs.pretender((server, helper) => {
|
||||
const tagGroups = {
|
||||
tag_group: {
|
||||
id: 42,
|
||||
name: "test tag group",
|
||||
tag_names: ["monkey"],
|
||||
parent_tag_name: [],
|
||||
one_per_topic: false,
|
||||
permissions: { everyone: 1 },
|
||||
},
|
||||
};
|
||||
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 },
|
||||
},
|
||||
});
|
||||
return helper.response(tagGroups);
|
||||
});
|
||||
server.get("/forum/tag_groups", () => {
|
||||
return helper.response(tagGroups);
|
||||
});
|
||||
|
||||
server.get("/groups/search.json", () => {
|
||||
@ -82,4 +87,13 @@ acceptance("Tag Groups", function (needs) {
|
||||
"selected permission does not change after saving"
|
||||
);
|
||||
});
|
||||
|
||||
test("going back to tags supports subfolder", async function (assert) {
|
||||
setPrefix("/forum");
|
||||
|
||||
await visit("/tag_groups");
|
||||
assert
|
||||
.dom("a.tag-groups--back")
|
||||
.hasAttribute("href", "/forum/tags", "supports subfolder");
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user