Il funnel mostra stage attuale e cumulato, i KPI escludono Da contattare e le liste usano il totale reale invece del tetto a 20. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
946 B
Ruby
27 lines
946 B
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(/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
|
|
end
|