1. поправлено работа с таймерами в vMix
2. поправлено немного Заготовки
This commit is contained in:
@@ -27,20 +27,21 @@ def test_penalty_vmix_display_uses_only_started_or_paused_active_penalties():
|
||||
|
||||
def test_main_countdown_start_pause_stop_all_hard_sync_web_value():
|
||||
block = _block("async function syncActiveVmixGameCountdown", "function penaltyMirrorKey")
|
||||
start = block.split('if (["timer_start", "timer_restart", "timer_resume"].includes(eventName))', 1)[1].split('} else if (eventName === "timer_pause")', 1)[0]
|
||||
assert start.index('Function: "SetCountdown"') < start.index('Function: "StartCountdown"')
|
||||
pause = block.split('eventName === "timer_pause"', 1)[1].split('} else if (["timer_stop", "timer_finished"]', 1)[0]
|
||||
assert pause.index('Function: "PauseCountdown"') < pause.index('Function: "SetCountdown"')
|
||||
stop = block.split('["timer_stop", "timer_finished"].includes(eventName)', 1)[1].split('} else if (["timer_reset"', 1)[0]
|
||||
assert stop.index('Function: "StopCountdown"') < stop.index('Function: "SetCountdown"')
|
||||
assert 'vmixCountdownSyncCommands(input, selectedName, valueProvider, "start")' in block
|
||||
assert 'vmixCountdownSyncCommands(input, selectedName, valueProvider, "pause")' in block
|
||||
assert 'vmixCountdownSyncCommands(input, selectedName, valueProvider, "stop")' in block
|
||||
helper = _block("function vmixCountdownSyncCommands", "function buildShortcutRuntimeContext")
|
||||
start_branch = helper.rsplit("return [", 1)[1]
|
||||
assert start_branch.index('Function: "SuspendCountdown"') < start_branch.index('Function: "SetCountdown"')
|
||||
assert start_branch.index('Function: "SetCountdown"') < start_branch.index('Function: "StartCountdown"')
|
||||
|
||||
|
||||
def test_penalty_pause_freezes_before_reseed_and_start_reseeds_before_run():
|
||||
block = _block("async function rebalanceVmixPenaltyTargets", "function finishActionMatchesSource")
|
||||
assert 'stopCommands.push({ Function: "PauseCountdown"' in block
|
||||
assert 'stopCommands.push({ Function: "SuspendCountdown"' in block
|
||||
assert 'setCommands.push({ Function: "SetCountdown"' in block
|
||||
assert 'runCommands.push({ Function: "StartCountdown"' in block
|
||||
assert "Never StartCountdown for a prepared item" in block
|
||||
assert "prepared/paused penalty" in block
|
||||
|
||||
|
||||
def test_combined_shortcut_changes_web_first_then_synchronizes_vmix():
|
||||
@@ -48,8 +49,9 @@ def test_combined_shortcut_changes_web_first_then_synchronizes_vmix():
|
||||
web_game = block.index("if (step.start_web_game)")
|
||||
vmix_game = block.index("if (step.sync_vmix_game && step.game_vmix_input)")
|
||||
assert web_game < vmix_game
|
||||
assert block.index('Function: "PauseCountdown"') < block.index('Function: "SetCountdown"', block.index('Function: "PauseCountdown"'))
|
||||
assert 'Function: "StartCountdown"' in block
|
||||
assert 'vmixCountdownSyncCommands(' in block
|
||||
assert '() => gameTimerState.currentMs' in block
|
||||
assert '() => event.remainingMs' in block
|
||||
|
||||
|
||||
def test_build95_runtime_version():
|
||||
|
||||
Reference in New Issue
Block a user