mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FEATURE: filter additional keywords for the sidebar (#26148)
With the new admin sidebar restructure, we have a link to "Installed plugins". We would like to ensure that when the admin is searching for a plugin name like "akismet" or "automation" this link will be visible. Also when entering the plugins page, related plugins should be highlighted.
This commit is contained in:

committed by
GitHub

parent
bbb18fa2ce
commit
9afb0b29f8
@ -18,20 +18,28 @@ RSpec.describe ApplicationController do
|
||||
end
|
||||
|
||||
context "when user is admin" do
|
||||
it "has correctly loaded preloaded data for enabledPluginAdminRoutes" do
|
||||
it "has correctly loaded preloaded data for visiblePlugins" do
|
||||
sign_in(admin)
|
||||
get "/latest"
|
||||
expect(JSON.parse(preloaded_json["enabledPluginAdminRoutes"])).to include(
|
||||
{ "label" => "chat.admin.title", "location" => "chat", "use_new_show_route" => false },
|
||||
expect(JSON.parse(preloaded_json["visiblePlugins"])).to include(
|
||||
{
|
||||
"name" => "chat",
|
||||
"admin_route" => {
|
||||
"label" => "chat.admin.title",
|
||||
"location" => "chat",
|
||||
"use_new_show_route" => false,
|
||||
},
|
||||
"enabled" => true,
|
||||
},
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context "when user is not admin" do
|
||||
it "does not include preloaded data for enabledPluginAdminRoutes" do
|
||||
it "does not include preloaded data for visiblePlugins" do
|
||||
sign_in(user)
|
||||
get "/latest"
|
||||
expect(preloaded_json["enabledPluginAdminRoutes"]).to eq(nil)
|
||||
expect(preloaded_json["visiblePlugins"]).to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user