mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
FIX: Ensure category-tag filter routes are functioning (#17420)
This regressed as part of the changes in fc36ac6c. This commit also introduces a test which would have caught the issue.
This commit is contained in:
parent
5a4c35f627
commit
0ffa93ccaf
@ -107,15 +107,15 @@ export default {
|
||||
})
|
||||
);
|
||||
app.register(
|
||||
`route:tag.show-${filterDasherized}-category`,
|
||||
`route:tags.show-category-${filterDasherized}`,
|
||||
TagShowRoute.extend({ navMode: filter })
|
||||
);
|
||||
app.register(
|
||||
`route:tag.show-${filterDasherized}-category-none`,
|
||||
`route:tags.show-category-none-${filterDasherized}`,
|
||||
TagShowRoute.extend({ navMode: filter, noSubcategories: true })
|
||||
);
|
||||
app.register(
|
||||
`route:tag.show-${filterDasherized}-category-all`,
|
||||
`route:tags.show-category-all-${filterDasherized}`,
|
||||
TagShowRoute.extend({ navMode: filter, noSubcategories: false })
|
||||
);
|
||||
});
|
||||
|
@ -284,6 +284,7 @@ acceptance("Tag info", function (needs) {
|
||||
[
|
||||
"/tags/c/faq/4/planters/l/latest.json",
|
||||
"/tags/c/feature/2/planters/l/latest.json",
|
||||
"/tags/c/feature/2/planters/l/top.json",
|
||||
"/tags/c/feature/2/none/planters/l/latest.json",
|
||||
].forEach((url) => {
|
||||
server.get(url, () => {
|
||||
@ -497,6 +498,17 @@ acceptance("Tag info", function (needs) {
|
||||
assert.strictEqual(currentURL(), "/tags/c/feature/2/none/planters");
|
||||
});
|
||||
|
||||
test("can visit show-category-latest routes", async function (assert) {
|
||||
await visit("/tags/c/feature/2/planters");
|
||||
|
||||
await click(".nav-item_latest a[href]");
|
||||
// await pauseTest();
|
||||
assert.strictEqual(currentURL(), "/tags/c/feature/2/planters/l/latest");
|
||||
|
||||
await click(".nav-item_top a[href]");
|
||||
assert.strictEqual(currentURL(), "/tags/c/feature/2/planters/l/top");
|
||||
});
|
||||
|
||||
test("admin can manage tags", async function (assert) {
|
||||
updateCurrentUser({ moderator: false, admin: true });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user