Stabilizza regia, live web e sync punteggi app nativa.

Corregge scadenza token regia oltre le 8h, tabellone HTML sulla pagina live,
pulsanti pausa/ripresa in regia, link admin e broadcast ActionCable diretto.
App Android: overlay branding, sync score da regia via WebSocket con reconnect e poll.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-08 09:30:43 +02:00
parent 08e800120a
commit ae36d17adb
55 changed files with 2819 additions and 285 deletions

View File

@@ -22,4 +22,24 @@ RSpec.describe "Public regia", type: :request do
expect(response).to have_http_status(:ok)
expect(session.score_state.reload.home_points).to eq(1)
end
it "mette in pausa e riprende la diretta" do
token = Sessions::RegiaAccess.new(session).issue_token!
post public_regia_pause_path(token)
expect(response).to have_http_status(:ok)
expect(session.reload.status).to eq("paused")
post public_regia_resume_path(token)
expect(response).to have_http_status(:ok)
expect(session.reload.status).to eq("connecting")
end
it "emette token valido anche oltre le 8 ore dalla partenza" do
session.update!(started_at: 9.hours.ago)
token = Sessions::RegiaAccess.new(session).issue_token!
session.reload
expect(session.regia_token_expires_at).to be > Time.current
get public_regia_path(token)
expect(response).to have_http_status(:ok)
end
end