Ensure console.clear resets the console buffer.
(api_client, device_simulator, clean_state)
| 35 | |
| 36 | @pytest.mark.integration |
| 37 | def test_console_clear(api_client, device_simulator, clean_state): |
| 38 | """Ensure console.clear resets the console buffer.""" |
| 39 | api_client.configure_network(host="127.0.0.1", port=9000, socket_type="tcp") |
| 40 | api_client.connect_device() |
| 41 | assert device_simulator.wait_for_connection(timeout=5.0) |
| 42 | |
| 43 | device_simulator.send_frame(b"console test\n") |
| 44 | length = _wait_for_console_length(api_client, minimum=1) |
| 45 | assert length > 0, "Console buffer should contain data" |
| 46 | |
| 47 | api_client.command("console.clear") |
| 48 | length = _wait_for_console_empty(api_client, timeout=2.0) |
| 49 | assert length == 0, "Console buffer should be empty" |
| 50 | |
| 51 | |
| 52 | @pytest.mark.integration |
nothing calls this directly
no test coverage detected