1. поправлено работа с таймерами в vMix
2. поправлено немного Заготовки
This commit is contained in:
@@ -8,9 +8,10 @@ APP = (ROOT / "app.py").read_text(encoding="utf-8")
|
||||
def test_game_countdown_resume_is_reseeded_before_start():
|
||||
block = APP_JS.split("async function syncActiveVmixGameCountdown", 1)[1].split("function penaltyMirrorKey", 1)[0]
|
||||
assert '["timer_start", "timer_restart", "timer_resume"].includes(eventName)' in block
|
||||
set_pos = block.index('Function: "SetCountdown"')
|
||||
start_pos = block.index('Function: "StartCountdown"')
|
||||
assert set_pos < start_pos
|
||||
assert 'vmixCountdownSyncCommands(input, selectedName, valueProvider, "start")' in block
|
||||
helper = APP_JS.split("function vmixCountdownSyncCommands", 1)[1].split("function buildShortcutRuntimeContext", 1)[0]
|
||||
start_branch = helper.rsplit("return [", 1)[1]
|
||||
assert start_branch.index('Function: "SetCountdown"') < start_branch.index('Function: "StartCountdown"')
|
||||
assert 'eventName === "timer_resume"' not in block
|
||||
|
||||
|
||||
@@ -18,8 +19,9 @@ def test_hockey_timer_shortcut_reseeds_game_and_penalty_on_resume():
|
||||
block = APP_JS.split('case "hockey_vmix_timers_start":', 1)[1].split('case "delay":', 1)[0]
|
||||
# Resume must no longer have a StartCountdown-only branch.
|
||||
assert '} else if (action === "resume") {' not in block
|
||||
assert block.count('Function: "SetCountdown"') >= 2
|
||||
assert block.count('Function: "StartCountdown"') >= 2
|
||||
assert block.count('vmixCountdownSyncCommands(') >= 2
|
||||
assert '() => gameTimerState.currentMs' in block
|
||||
assert '() => event.remainingMs' in block
|
||||
|
||||
|
||||
def test_penalty_rebalance_pairs_every_start_with_current_web_value():
|
||||
|
||||
Reference in New Issue
Block a user