remove the --profile flag on windows open and add opening a new window with a url

This commit is contained in:
2026-04-10 13:06:53 +02:00
parent 61b774a7a4
commit 362b53a384
8 changed files with 40 additions and 14 deletions
+16
View File
@@ -471,6 +471,22 @@ class TestWindows:
{"id": 2, "tabCount": 3, "state": "maximized", "browser": "work"},
]
def test_windows_open_without_url(self, b, mock_send):
mock_send.return_value = {"id": 5}
result = b.windows_open()
assert result == {"id": 5}
mock_send.assert_called_once_with("windows.open", {"url": None}, profile=None)
def test_windows_open_with_url(self, b, mock_send):
mock_send.return_value = {"id": 9}
result = b.windows_open("https://example.com")
assert result == {"id": 9}
mock_send.assert_called_once_with("windows.open", {"url": "https://example.com"}, profile=None)
# ── Tab model ─────────────────────────────────────────────────────────────────