mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
This commit covers fully converting the chat integration plugin to use the correct admin UI guidelines for Discourse at https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780 and converting the plugin to use the newer admin plugin show route. A TLDR: * Migrated admin UI to new plugin pattern * Replaced channel edit modal with inline forms * Deleted legacy admin assets * Rewrote and modernized Glimmer components * Updated admin URL routes * Moved everything to FormKit * Updated translations and fixed empty lists --------- Co-authored-by: Martin Brennan <martin@discourse.org>
27 lines
753 B
Ruby
Vendored
27 lines
753 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Provider navigation" do
|
|
fab!(:admin)
|
|
|
|
before do
|
|
SiteSetting.chat_integration_enabled = true
|
|
SiteSetting.chat_integration_telegram_enabled = true
|
|
SiteSetting.chat_integration_discord_enabled = true
|
|
sign_in(admin)
|
|
end
|
|
|
|
it "only marks the current provider's nav pill as active" do
|
|
visit("/admin/plugins/discourse-chat-integration/providers/telegram")
|
|
|
|
expect(page).to have_css(
|
|
".admin-nav-submenu li.active",
|
|
count: 1,
|
|
text: I18n.t("js.chat_integration.provider.telegram.title"),
|
|
)
|
|
expect(page).to have_css(
|
|
".admin-nav-submenu li:not(.active)",
|
|
count: 1,
|
|
text: I18n.t("js.chat_integration.provider.discord.title"),
|
|
)
|
|
end
|
|
end
|