mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
FEATURE: Admin plugin list redesign (#24363)
* Remove checkmark for official plugins * Add author for plugin, which is By Discourse for all discourse and discourse-org github plugins * Link to meta topic instead of github repo * Add experimental flag for plugin metadata and show this as a badge on the plugin list if present --------- Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
This commit is contained in:
33
spec/system/admin_plugins_list_spec.rb
Normal file
33
spec/system/admin_plugins_list_spec.rb
Normal file
@ -0,0 +1,33 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe "Admin Plugins List", type: :system, js: true do
|
||||
fab!(:current_user) { Fabricate(:admin) }
|
||||
|
||||
before { sign_in(current_user) }
|
||||
|
||||
let(:spoiler_alert_plugin) do
|
||||
plugins = Plugin::Instance.find_all("#{Rails.root}/plugins")
|
||||
plugins.find { |p| p.name == "spoiler-alert" }
|
||||
end
|
||||
|
||||
xit "shows the list of plugins" do
|
||||
visit "/admin/plugins"
|
||||
|
||||
plugin_row = find(".admin-plugins-list tr[data-plugin-name=\"spoiler-alert\"]")
|
||||
expect(plugin_row).to have_css(
|
||||
"td.admin-plugins-list__row .admin-plugins__name-with-badges .admin-plugins__name",
|
||||
text: "Spoiler Alert",
|
||||
)
|
||||
expect(plugin_row).to have_css(
|
||||
"td.admin-plugins-list__row .admin-plugins__author",
|
||||
text: I18n.t("admin_js.admin.plugins.author", { author: "Discourse" }),
|
||||
)
|
||||
expect(plugin_row).to have_css(
|
||||
"td.admin-plugins-list__row .admin-plugins__name-with-badges .admin-plugins__name a[href=\"https://meta.discourse.org/t/12650\"]",
|
||||
)
|
||||
expect(plugin_row).to have_css(
|
||||
"td.admin-plugins-list__row .admin-plugins__about",
|
||||
text: spoiler_alert_plugin.metadata.about,
|
||||
)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user