Closed CodeSandwich closed 11 months ago
So the problem is that this test starts off by building the list of start URLs by scraping https://symfony.com/doc/current/book/controller.html for the list of versions of Symfony, but the page apparently got updated, and the JS code can't find the right DOM objects, so it fails.
Description
The
scraper/src/tests/config_loader/open_selenium_browser_test.py::TestOpenSeleniumBrowser::test_browser_needed_when_config_contains_automatic_tag
test is failing.Steps to reproduce
Run steps from
Setting up the Python environment
inCONTRIBUTING.md
, then run./docsearch test
.Expected Behavior
All the tests are passing.
Actual Behavior
All the tests are passing except
scraper/src/tests/config_loader/open_selenium_browser_test.py::TestOpenSeleniumBrowser::test_browser_needed_when_config_contains_automatic_tag
, which fails withselenium.common.exceptions.JavascriptException: Message: javascript error: $ is not defined
.The full output
``` ['pytest', './scraper/src'] ============================================================================================================ test session starts ============================================================================================================= platform linux -- Python 3.10.13, pytest-7.3.1, pluggy-1.0.0 rootdir: /home/zuczek/workspace/typesense-docsearch-scraper collected 98 items scraper/src/tests/config_loader/anchors_test.py ... [ 3%] scraper/src/tests/config_loader/basic_test.py .... [ 7%] scraper/src/tests/config_loader/domains_test.py .... [ 11%] scraper/src/tests/config_loader/get_extra_facets_test.py .... [ 15%] scraper/src/tests/config_loader/open_selenium_browser_test.py ..F [ 18%] scraper/src/tests/config_loader/selectors_exclude_test.py ... [ 21%] scraper/src/tests/config_loader/sitemap_test.py ... [ 24%] scraper/src/tests/config_loader/start_urls_test.py ...... [ 30%] scraper/src/tests/config_loader/stop_urls_test.py .. [ 32%] scraper/src/tests/default_strategy/custom_attributes_test.py . [ 33%] scraper/src/tests/default_strategy/default_value_test.py ...... [ 39%] scraper/src/tests/default_strategy/get_anchor_test.py ....... [ 46%] scraper/src/tests/default_strategy/get_hierarchy_radio_test.py ... [ 50%] scraper/src/tests/default_strategy/get_level_weight_test.py . [ 51%] scraper/src/tests/default_strategy/get_records_from_dom_test.py ................. [ 68%] scraper/src/tests/default_strategy/get_settings_test.py . [ 69%] scraper/src/tests/default_strategy/globals_test.py ...... [ 75%] scraper/src/tests/default_strategy/meta_test.py ......... [ 84%] scraper/src/tests/default_strategy/min_indexed_level_test.py . [ 85%] scraper/src/tests/default_strategy/page_rank_test.py .... [ 89%] scraper/src/tests/default_strategy/searchable_level_test.py .. [ 91%] scraper/src/tests/default_strategy/strip_chars_test.py .. [ 93%] scraper/src/tests/default_strategy/tags_test.py ... [ 96%] scraper/src/tests/default_strategy/xpath_test.py ... [100%] ================================================================================================================== FAILURES ================================================================================================================== _______________________________________________________________________________ TestOpenSeleniumBrowser.test_browser_needed_when_config_contains_automatic_tag _______________________________________________________________________________ self =Metadata
Typesense Version: 0.9.1
OS: Linux Manjaro