remove planform and show extension version into client list

This commit is contained in:
2026-04-10 11:34:36 +02:00
parent bdf5ad842f
commit c9ecde9338
5 changed files with 53 additions and 7 deletions
+29
View File
@@ -55,6 +55,35 @@ def test_clients_exits_cleanly_when_registry_is_missing():
assert result.exit_code == 1
assert "No browser clients found" in result.output
def test_clients_shows_named_profile_and_uses_socket_uuid_for_default(tmp_path):
registry_path = tmp_path / "registry.json"
default_socket = tmp_path / "550e8400-e29b-41d4-a716-446655440000.sock"
work_socket = tmp_path / "work.sock"
registry_path.write_text(
'{"default": "%s", "work": "%s"}' % (default_socket, work_socket),
encoding="utf-8",
)
responses = {
"default": [{"profile": "default", "name": "Chrome", "version": "1", "extensionVersion": "2.3.4"}],
"work": [{"profile": "default", "name": "Chrome", "version": "1", "extensionVersion": "2.3.4"}],
}
def fake_send_command(command, args=None, profile=None):
assert command == "clients.list"
return responses[profile]
with patch("browser_cli.client.REGISTRY_PATH", registry_path), patch(
"browser_cli.cli.send_command", side_effect=fake_send_command
):
result = CliRunner().invoke(main, ["clients"])
assert result.exit_code == 0
assert "550e8400-e29b-41d4-a716-446655440000" in result.output
assert "work" in result.output
assert "Extension Version" in result.output
assert "2.3.4" in result.output
def test_extract_markdown_command():
with patch("browser_cli.commands.extract.send_command", return_value="# Title\n") as send_command:
result = CliRunner().invoke(main, ["extract", "markdown"])