mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 16:57:36 +08:00
`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`.
36 lines
948 B
Ruby
Vendored
36 lines
948 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
describe "Admin Dashboard Community Health" do
|
|
fab!(:current_user, :admin)
|
|
|
|
before do
|
|
SiteSetting.dashboard_improvements = false
|
|
sign_in(current_user)
|
|
end
|
|
|
|
describe "Pageview Report" do
|
|
context "when use_legacy_pageviews is true" do
|
|
before { SiteSetting.use_legacy_pageviews = true }
|
|
|
|
it "shows the 'Consolidated Pageviews' report" do
|
|
visit("/admin")
|
|
expect(page).to have_css(
|
|
".admin-report.consolidated-page-views",
|
|
text: I18n.t("reports.consolidated_page_views.title"),
|
|
)
|
|
end
|
|
end
|
|
|
|
context "when use_legacy_pageviews is false" do
|
|
before { SiteSetting.use_legacy_pageviews = false }
|
|
|
|
it "shows the 'Site Traffic' report" do
|
|
visit("/admin")
|
|
expect(page).to have_css(
|
|
".admin-report.site-traffic",
|
|
text: I18n.t("reports.site_traffic.title"),
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|