Files
eminuxCRM/test/controllers/dashboard_controller_test.rb
T
eminuxandCursor 47c4308815
CI / scan_ruby (push) Failing after 14m57s
CI / scan_js (push) Successful in 11m7s
CI / lint (push) Failing after 12m34s
Allinea il conteggio clienti della dashboard alle società, non ai deal vinti.
Neumarkt aveva due opportunità WON e gonfiava banner e card a 3, mentre la lista Solo clienti mostra 2 società.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 07:52:03 +02:00

37 lines
1.3 KiB
Ruby

require "test_helper"
class DashboardControllerTest < ActionDispatch::IntegrationTest
test "dashboard shows snapshot cards and dual funnel counts" do
login_as users(:admin)
get project_root_path(project_code: "matchlivetv")
assert_response :success
assert_match(/Da contattare/, response.body)
assert_match(/Prospect e clienti sono società/, response.body)
assert_match(/da qui in poi/, response.body)
assert_match(/In trattativa senza next action/, response.body)
assert_match(/Senza attività in timeline/, response.body)
assert_no_match(/↓ \d+%/, response.body)
end
test "reports funnel uses current and reached columns" do
login_as users(:admin)
get reports_path(project_code: "matchlivetv")
assert_response :success
assert_match(/In questo stage/, response.body)
assert_match(/Da qui in poi/, response.body)
assert_no_match(/dal passo precedente/, response.body)
end
test "today task rows use dark-mode surfaces" do
login_as users(:admin)
get project_root_path(project_code: "matchlivetv")
assert_response :success
assert_includes response.body, "dark:bg-amber-950"
assert_includes response.body, "dark:bg-amber-950 dark:text-amber-200"
assert_includes response.body, "dark:bg-zinc-700 dark:text-zinc-50"
end
end