mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 23:38:29 +08:00
FEATURE: Add invite link to the sidebar (#29448)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
This commit adds a new "Invite" link to the sidebar for all users who can invite to the site. Clicking the link opens the invite modal without changing the current route the user is on. Admins can customize the new link or remove it entirely if they wish by editing the sidebar section. Internal topic: t/129752.
This commit is contained in:
@ -47,13 +47,17 @@ RSpec.describe Category do
|
||||
|
||||
it "should delete associated sidebar_section_links when category is destroyed" do
|
||||
category_sidebar_section_link = Fabricate(:category_sidebar_section_link)
|
||||
Fabricate(:category_sidebar_section_link, linkable: category_sidebar_section_link.linkable)
|
||||
tag_sidebar_section_link = Fabricate(:tag_sidebar_section_link)
|
||||
category_sidebar_section_link_2 =
|
||||
Fabricate(:category_sidebar_section_link, linkable: category_sidebar_section_link.linkable)
|
||||
|
||||
expect { category_sidebar_section_link.linkable.destroy! }.to change {
|
||||
SidebarSectionLink.count
|
||||
}.from(12).to(10)
|
||||
expect(SidebarSectionLink.last).to eq(tag_sidebar_section_link)
|
||||
expect(
|
||||
SidebarSectionLink.where(
|
||||
id: [category_sidebar_section_link.id, category_sidebar_section_link_2.id],
|
||||
).count,
|
||||
).to eq(0)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user