0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/plugins/chat/spec/system/about_page_site_acitivity_spec.rb
2026-03-20 00:39:52 +01:00

25 lines
826 B
Ruby
Vendored

# frozen_string_literal: true
describe "Chat messages site activity in the about page" do
let(:about_page) { PageObjects::Pages::About.new }
before do
chat_system_bootstrap
Fabricate(:chat_message, created_at: 5.hours.ago)
Fabricate(:chat_message, created_at: 2.days.ago)
Fabricate(:chat_message, created_at: 6.days.ago)
Fabricate(:chat_message, created_at: 9.days.ago)
end
it "displays the number of chat messages in the last 7 days" do
about_page.visit
expect(about_page.site_activities.custom("chat-messages")).to have_custom_count(
I18n.t("js.about.activities.chat_messages", count: 3, formatted_number: "3"),
)
expect(about_page.site_activities.custom("chat-messages")).to have_custom_period(
I18n.t("js.about.activities.periods.last_7_days"),
)
end
end