Add HTML fixture files for scraper unit tests
Some checks failed
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Lint & Test (pull_request) Successful in 43s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Failing after 2s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Lint & Test (pull_request) Successful in 43s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Failing after 2s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Create three HTML fixture files in __tests__/scraper/fixtures/ to support deterministic testing of the scraper's HTML parsing logic: - sample-listing.html: Contains 10 real unit articles extracted from the live listings page, covering studios, 1BR, and 2BR floor plans with varied pricing and availability dates. - sample-listing-empty.html: Minimal page structure with an empty units section, for testing graceful handling of pages with no listings. - sample-listing-call.html: Contains units with "Call for pricing" instead of numeric rent values, for testing the parser's handling of non-numeric price fields.
This commit is contained in:
9
__tests__/scraper/fixtures/sample-listing-empty.html
Normal file
9
__tests__/scraper/fixtures/sample-listing-empty.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Country Club Towers - No Units</title></head>
|
||||
<body>
|
||||
<section class="spaces__tab-unit">
|
||||
<!-- Empty - no units available -->
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user