Rende usabili calendario, overlay ospite e stato diretta del cartellone.
Il calendario non deve più scorrere in orizzontale, il logo a destra non copre il nome e una diretta YouTube o in collegamento compare come In diretta. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -366,6 +366,7 @@ RSpec.describe "Tournaments", type: :request do
|
||||
|
||||
get public_tournament_path(tournament, tab: "calendario")
|
||||
expect(response.body).to include("tournament-match-swap__btn")
|
||||
expect(response.body).to include("tournament-match-row")
|
||||
expect(response.body).to include(public_swap_tournament_match_path(tournament, match))
|
||||
expect(response.body).to include("tournament-calendar.js")
|
||||
|
||||
@@ -782,6 +783,50 @@ RSpec.describe "Tournaments", type: :request do
|
||||
expect(response.body).to include(public_tournament_page_path(tournament.slug))
|
||||
end
|
||||
|
||||
it "marca In diretta una gara YouTube o in collegamento, non In attesa" do
|
||||
assign_plan!("premium_full")
|
||||
login!
|
||||
tournament = Tournaments::Create.call(
|
||||
club: club,
|
||||
attrs: {
|
||||
name: "Open Diretta YouTube",
|
||||
sport_key: "basket",
|
||||
starts_on: Date.current,
|
||||
ends_on: Date.current,
|
||||
format_kind: "free",
|
||||
courts: "Campo A"
|
||||
}
|
||||
)
|
||||
home = tournament.participants.create!(name: "Squadra 1")
|
||||
away = tournament.participants.create!(name: "Squadra 3")
|
||||
match = Tournaments::ScheduleMatch.call(
|
||||
tournament: tournament,
|
||||
attrs: {
|
||||
home_participant_id: home.id,
|
||||
away_participant_id: away.id,
|
||||
court: "Campo A",
|
||||
scheduled_at: 30.minutes.ago
|
||||
}
|
||||
)
|
||||
post public_publish_tournament_path(tournament)
|
||||
|
||||
session = StreamSession.create!(
|
||||
match: match, user: coach, platform: "youtube", status: "connecting",
|
||||
privacy_status: "unlisted", youtube_broadcast_id: "ytLiveBoard1"
|
||||
)
|
||||
get public_tournament_page_path(tournament.slug)
|
||||
expect(response.body).to include("tournament-live-status--live")
|
||||
expect(response.body).to include("In diretta")
|
||||
expect(response.body).not_to include("tournament-live-status--waiting")
|
||||
expect(response.body).to include("Guarda su YouTube")
|
||||
expect(response.body).to include(session.youtube_watch_url)
|
||||
|
||||
get public_tournament_path(tournament, tab: "dirette")
|
||||
expect(response.body).to include("tournament-live-status--live")
|
||||
expect(response.body).to include("In diretta")
|
||||
expect(response.body).not_to include("tournament-live-status--waiting_operator")
|
||||
end
|
||||
|
||||
it "marca Terminata una gara con risultato anche se l'orario è ancora futuro" do
|
||||
assign_plan!("premium_full")
|
||||
login!
|
||||
|
||||
Reference in New Issue
Block a user