Files
patterm/internal/harness/scenarios/switch_replay_clears_viewport.json

36 lines
1.0 KiB
JSON

{
"name": "switch_replay_clears_viewport",
"cols": 80,
"rows": 24,
"scripts": [
{
"name": "blanktop",
"body": "#!/bin/sh\nprintf '\\033[2;1HFIRST-ROW-TWO\\n'\nsleep 5\n"
}
],
"steps": [
{
"type": "mcp_call",
"method": "spawn_process",
"params": { "kind": "command", "argv": ["blanktop"], "name": "first" },
"save_as": "first"
},
{ "type": "wait_text", "contains": "FIRST-ROW-TWO", "timeout_ms": 5000 },
{
"type": "mcp_call",
"method": "spawn_process",
"params": { "kind": "command", "argv": ["sh", "-lc", "echo SECOND READY; sleep 5"], "name": "second" },
"save_as": "second"
},
{ "type": "wait_text", "contains": "SECOND READY", "timeout_ms": 5000 },
{
"type": "mcp_call",
"method": "select_process",
"params": { "process_id": "{{first.process_id}}" }
},
{ "type": "wait_stable", "timeout_ms": 5000 },
{ "type": "assert_contains", "contains": "FIRST-ROW-TWO" },
{ "type": "assert_not_contains", "contains": "SECOND READY" }
]
}