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,13 +6,13 @@ 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) => {
|
||||
server.post("/tag_groups", () => {
|
||||
return helper.response({
|
||||
const tagGroups = {
|
||||
tag_group: {
|
||||
id: 42,
|
||||
name: "test tag group",
|
||||
@ -21,7 +21,12 @@ acceptance("Tag Groups", function (needs) {
|
||||
one_per_topic: false,
|
||||
permissions: { everyone: 1 },
|
||||
},
|
||||
};
|
||||
server.post("/tag_groups", () => {
|
||||
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