mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 11:45:21 -05:00
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:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user