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(/Conteggio per stage attuale/, 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