Fix websurfer test error (#3138)

* Fix assertion error

* Update triggers
This commit is contained in:
Li Jiang 2024-07-15 23:37:15 +08:00 committed by GitHub
parent 5b1dc3bf63
commit 744fcbe299
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,8 @@ on:
paths:
- "autogen/**"
- "test/agentchat/contrib/**"
- "test/test_browser_utils.py"
- "test/test_retrieve_utils.py"
- ".github/workflows/contrib-tests.yml"
- "setup.py"

View File

@ -78,7 +78,7 @@ def test_simple_text_browser():
top_viewport = browser.visit_page(BLOG_POST_URL)
assert browser.viewport == top_viewport
assert browser.page_title.strip() == BLOG_POST_TITLE.strip()
assert BLOG_POST_STRING in browser.page_content
assert BLOG_POST_STRING in browser.page_content.replace("\n\n", " ").replace("\\", "")
# Check if page splitting works
approx_pages = math.ceil(len(browser.page_content) / viewport_size) # May be fewer, since it aligns to word breaks