fix(install): skip browser download when system chromium exists
This commit is contained in:
@@ -41,6 +41,16 @@ class TestChromiumSearchRoots:
|
||||
|
||||
|
||||
class TestChromiumInstalled:
|
||||
def test_true_when_plain_chromium_on_path(self, monkeypatch):
|
||||
monkeypatch.delenv("AGENT_BROWSER_EXECUTABLE_PATH", raising=False)
|
||||
monkeypatch.setattr(
|
||||
bt.shutil,
|
||||
"which",
|
||||
lambda name: "/usr/bin/chromium" if name == "chromium" else None,
|
||||
)
|
||||
|
||||
assert bt._chromium_installed() is True
|
||||
|
||||
def test_true_when_chromium_dir_present(self, monkeypatch, tmp_path):
|
||||
monkeypatch.setenv("PLAYWRIGHT_BROWSERS_PATH", str(tmp_path))
|
||||
(tmp_path / "chromium-1208").mkdir()
|
||||
@@ -108,4 +118,3 @@ class TestRunBrowserCommandChromiumGuard:
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user