возможно теперь загружается матч через интернет, но не точно
This commit is contained in:
25
tests/test_build65_nonadmin_match_selection.py
Normal file
25
tests/test_build65_nonadmin_match_selection.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
JS = (ROOT / "hockey_data" / "static" / "tournament-menu.js").read_text(encoding="utf-8")
|
||||
ROUTER = (ROOT / "hockey_data" / "router.py").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_account_switch_clears_account_bound_runtime_state():
|
||||
assert 'account: "hockey.accountId"' in JS
|
||||
assert 'previousAccountId !== currentAccountId' in JS
|
||||
assert 'localStorage.removeItem(storage.session)' in JS
|
||||
assert 'localStorage.removeItem(storage.game)' in JS
|
||||
assert 'localStorage.removeItem(storage.vmixDevice)' in JS
|
||||
assert 'await ensureAccountScopedRuntimeState();' in JS
|
||||
|
||||
|
||||
def test_match_session_retries_without_stale_agent():
|
||||
assert 'const selectedDeviceId = currentAgentDeviceId();' in JS
|
||||
assert 'Retry the operator session without Agent' in JS
|
||||
assert 'JSON.stringify({ ...sessionPayload, vmix_device_id: "" })' in JS
|
||||
|
||||
|
||||
def test_agent_assignment_cannot_break_operator_session_creation():
|
||||
assert 'result["agent_warning"] = str(agent_error)[:300]' in ROUTER
|
||||
assert 'result["agent_assignment"] = None' in ROUTER
|
||||
Reference in New Issue
Block a user