0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/spec/system/admin_dashboard_general_spec.rb
Krzysztof Kotlarek f6727e03b6
DEV: Promote dashboard_improvements upcoming change to beta (#42116)
`promote_upcoming_changes_on_status` defaults to `beta`, so promoting
the change makes the redesigned dashboard the default everywhere,
including in the test environment.

Specs covering the legacy dashboard now opt out explicitly with
`SiteSetting.dashboard_improvements = false`.
2026-07-29 12:09:26 +08:00

23 lines
704 B
Ruby
Vendored

# frozen_string_literal: true
describe "Admin Dashboard General Tab" do
fab!(:admin)
fab!(:user)
fab!(:user_visit) { Fabricate(:user_visit, user: admin) }
fab!(:user_visit_2) { Fabricate(:user_visit, user: user, mobile: true) }
fab!(:user_visit_3) { Fabricate(:user_visit, user: user, visited_at: 1.day.ago) }
before do
SiteSetting.dashboard_improvements = false
sign_in(admin)
end
it "displays correct visit counters combining desktop and mobile visits" do
visit("/admin")
within ".admin-report.visits .admin-report-counters" do
expect(page).to have_css(".today-count", text: "2")
expect(page).to have_css(".yesterday-count", text: "1")
end
end
end