feat: improve recipe import UX and add comprehensive test coverage
## Changes ### Recipe Import Improvements - Move tag input to top of import preview for better UX - Allow users to add tags immediately after importing, before viewing full details - Keep focus in tag input field after pressing Enter for rapid tag addition ### Recipe Scraper Enhancements - Remove deprecated supported_only parameter from Python scraper - Update Dockerfile to explicitly install latest recipe-scrapers package - Ensure compatibility with latest recipe-scrapers library (14.55.0+) ### Testing Infrastructure - Add comprehensive tests for recipe tagging features (87% coverage) - Add real integration tests for auth routes (37% coverage on auth.routes.ts) - Add real integration tests for backup routes (74% coverage on backup.routes.ts) - Add real integration tests for scraper service (67% coverage) - Overall project coverage improved from 72.7% to 77.6% ### Test Coverage Details - 377 tests passing (up from 341) - 7 new tests for quick tagging feature - 17 new tests for authentication flows - 16 new tests for backup functionality - 6 new tests for recipe scraper integration All tests verify: - Tag CRUD operations work correctly - Tags properly connected using connectOrCreate pattern - Recipe import with live URL scraping - Security (path traversal prevention, rate limiting) - Error handling and validation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,9 +51,9 @@ def scrape_recipe(url):
|
||||
# Fetch HTML content
|
||||
html = fetch_html(url)
|
||||
|
||||
# Use scrape_html with supported_only=False to enable wild mode
|
||||
# This allows scraping from ANY website, not just the 541+ officially supported ones
|
||||
scraper = scrape_html(html, org_url=url, supported_only=False)
|
||||
# Use scrape_html to scrape the recipe
|
||||
# Works with officially supported websites
|
||||
scraper = scrape_html(html, org_url=url)
|
||||
|
||||
# Extract recipe data with safe extraction
|
||||
recipe_data = {
|
||||
|
||||
Reference in New Issue
Block a user