diff --git a/surfsense_backend/tests/unit/platforms/indeed_jobs/test_parsers.py b/surfsense_backend/tests/unit/platforms/indeed_jobs/test_parsers.py index 7b9ca6298..38a6544b6 100644 --- a/surfsense_backend/tests/unit/platforms/indeed_jobs/test_parsers.py +++ b/surfsense_backend/tests/unit/platforms/indeed_jobs/test_parsers.py @@ -9,6 +9,7 @@ from app.proprietary.platforms.indeed_jobs.parsers import ( extract_jobcards_blob, job_results, parse_job, + parse_job_detail, ) _FIXTURE_DIR = Path(__file__).parent / "fixtures" @@ -137,3 +138,39 @@ def test_fixture_blob_parses_into_items(): assert item["title"] assert item["jobUrl"].startswith("https://www.indeed.com/viewjob?jk=") assert "salaryText" in item["salary"] + + +# --- detail page (parse_job_detail) ---------------------------------------- + + +def test_parse_job_detail_extracts_description_and_fields(): + html = (_FIXTURE_DIR / "sample_viewjob.html").read_text() + detail = parse_job_detail(html) + assert detail["descriptionHtml"].startswith("