mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 10:37:59 +08:00
In nested view it adds an "activity log" link to open the modal. This contains whispers with action code, and small action posts, which are not rendered on the nested view.
22 lines
651 B
Ruby
22 lines
651 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Nested activity log" do
|
|
fab!(:admin)
|
|
fab!(:topic) { Fabricate(:topic, user: admin) }
|
|
fab!(:op) { Fabricate(:post, topic: topic, user: admin, post_number: 1) }
|
|
|
|
before do
|
|
SiteSetting.nested_replies_enabled = true
|
|
sign_in(admin)
|
|
end
|
|
|
|
it "opens the activity log modal and lists small actions" do
|
|
topic.add_small_action(admin, "closed.enabled")
|
|
|
|
page.visit("/n/#{topic.slug}/#{topic.id}")
|
|
find(".nested-view__activity-link").click
|
|
|
|
expect(page).to have_css(".nested-activity-log-modal")
|
|
expect(page).to have_css(".nested-activity-log-modal__item", count: 2)
|
|
end
|
|
end
|