mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 13:08:40 +08:00
20 lines
648 B
Ruby
Vendored
20 lines
648 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 { sign_in(admin) }
|
|
|
|
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
|