diff --git a/app/assets/javascripts/admin/addon/templates/site-settings.hbs b/app/assets/javascripts/admin/addon/templates/site-settings.hbs index a12f1f05339..67235d6b42f 100644 --- a/app/assets/javascripts/admin/addon/templates/site-settings.hbs +++ b/app/assets/javascripts/admin/addon/templates/site-settings.hbs @@ -37,11 +37,12 @@ @route="adminSiteSettingsCategory" @model={{category.nameKey}} class={{category.nameKey}} + title={{category.name}} > {{category.name}} - {{#if category.count}}({{category.count}}){{/if}} + {{#if category.count}} + ({{category.count}}) + {{/if}} {{/each}} diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js index cda13cc16a0..f804236f371 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js @@ -3,6 +3,7 @@ import { count, exists, query, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; import { click, @@ -190,4 +191,17 @@ acceptance("Admin - Site Settings", function (needs) { "blocked_onebox_domains=proper.com" ); }); + + test("nav menu items have titles", async (assert) => { + await visit("/admin/site_settings"); + + const navItems = queryAll(".admin-nav .nav-stacked li a"); + navItems.each((_, item) => { + assert.equal( + item.title, + item.innerText, + "menu item has title, and the title is equal to menu item's label" + ); + }); + }); });