Skip to content

Commit

Permalink
fix: fixed browser test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 28, 2024
1 parent 02db7d9 commit 62fb25d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/test_browser.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import pytest

# TODO: we should also test lynx backend
playwright = pytest.importorskip("playwright")

# noreorder
from gptme.tools.browser import load_page, read_url, search # fmt: skip

# noreorder
from playwright.sync_api import expect # fmt: skip


@pytest.mark.slow
def test_browser():
page = load_page("https://superuserlabs.org")
expect(page.get_by_role("main")).to_contain_text("Erik Bjäreholt")

from gptme.tools.browser import read_url, search # fmt: skip

# FIXME: Broken
# @pytest.mark.slow
Expand All @@ -37,5 +28,5 @@ def test_read_url_with_links():
# check that "Erik Bjäreholt" is present
assert "Erik Bjäreholt" in s

# check that markdown link to activitywatch is present
assert "(https://activitywatch.net/)" in s
# check that link to activitywatch is present
assert "https://activitywatch.net/" in s

0 comments on commit 62fb25d

Please sign in to comment.