FIX: Sidebar preferences link shown when navigation menu is legacy (#19568)

This commit is contained in:
Alan Guo Xiang Tan 2022-12-22 07:58:06 +08:00 committed by GitHub
parent f6174587ef
commit 954b39f5ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -61,7 +61,7 @@
</LinkTo>
</li>
{{#if (not (eq @siteSettings.navigation_menu "legacy"))}}
{{#if (not (eq this.siteSettings.navigation_menu "legacy"))}}
<li class="indent nav-sidebar">
<LinkTo @route="preferences.sidebar">
{{i18n "user.preferences_nav.sidebar"}}

View File

@ -52,6 +52,14 @@ acceptance("User Preferences - Sidebar", function (needs) {
});
});
test("sidebar preferences link is not shown when navigation menu is set to legacy", async function (assert) {
this.siteSettings.navigation_menu = "legacy";
await visit("/u/eviltrout/preferences");
assert.dom(".nav-sidebar").doesNotExist();
});
test("user encountering error when adding categories to sidebar", async function (assert) {
updateCurrentUser({ sidebar_category_ids: [6] });