FIX: Update optionalRequire paths after admin directory move (#35551)

Looks like the admin directory move (#35322) caused a couple issues with
optionalRequire paths, this updates the paths to get the tag admin
dropdown and review queue IP lookup working again.
This commit is contained in:
Kris
2025-10-22 12:49:54 -04:00
committed by GitHub
parent a39421fa07
commit 27d5fdad8d
3 changed files with 27 additions and 2 deletions
@@ -252,7 +252,7 @@ export default class ReviewableItem extends Component {
}
get IpLookupComponent() {
return optionalRequire("admin/components/ip-lookup");
return optionalRequire("discourse/admin/components/ip-lookup");
}
@bind
@@ -26,7 +26,7 @@ export default class TagsIndexController extends Controller {
}
get TagsAdminDropdownComponent() {
return optionalRequire("admin/components/tags-admin-dropdown");
return optionalRequire("discourse/admin/components/tags-admin-dropdown");
}
@discourseComputed("groupedByCategory", "groupedByTagGroup")
+25
View File
@@ -0,0 +1,25 @@
# frozen_string_literal: true
describe "Tags index page", type: :system do
fab!(:admin)
fab!(:user)
context "when visiting as a staff user" do
it "shows the admin dropdown" do
sign_in(admin)
visit("/tags")
expect(page).to have_css(".tags-admin-dropdown")
end
end
context "when visiting as a regular user" do
it "does not show the admin dropdown" do
sign_in(user)
visit("/tags")
expect(page).to have_css(".tags-index")
expect(page).to have_no_css(".tags-admin-dropdown")
end
end
end