fix(browser): assert start_automation on send_json; run test_server.py in CI (#6012)

#5818 moved start_automation delivery from send_text to send_json, but
test_ws_no_origin_cli_start_session still asserted send_text, and a
not-awaited check on send_text became vacuous. CI never ran test_server.py
(only test_protocol_compliance.py), so the break went unseen.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Mervin PraisonandClaude Opus 5.5 authored and GitHub committed 2026-10-26 13:52:09 +01:00
1 parent e10129677f
commit f060fcfbdd
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -256,7 +256,7 @@ jobs:
"
/tmp/praisonai-browser-standalone/bin/praisonai-browser --help
bash "$GITHUB_WORKSPACE/scripts/check_c11_browser_imports.sh"
python -m pytest src/praisonai-browser/tests/browser/test_protocol_compliance.py -q -m "not network"
python -m pytest src/praisonai-browser/tests/browser/test_protocol_compliance.py src/praisonai-browser/tests/browser/test_server.py -q -m "not network"
- name: Standalone praisonai-mcp smoke (C12)
run: |
@@ -553,7 +553,7 @@ class TestRegisterRole:
{"type": "start_session", "goal": "Test"}, conn
)
assert response["code"] == "NO_EXTENSION"
conn.websocket.send_text.assert_not_awaited()
conn.websocket.send_json.assert_not_awaited()
@pytest.mark.asyncio
async def test_ws_no_origin_cli_start_session(self):
@@ -571,8 +571,8 @@ class TestRegisterRole:
{"type": "start_session", "goal": "Test"}, cli
)
assert response["status"] == "running"
ext.websocket.send_text.assert_awaited_once()
cli.websocket.send_text.assert_not_awaited()
ext.websocket.send_json.assert_awaited_once()
cli.websocket.send_json.assert_not_awaited()
if server._sessions:
server._sessions.close()