docs: apply fleet-template (16-artifact scaffold)
Adds missing standard artifacts: - README.md (if missing) - AGENTS.md (AI agent contract) - PLAN.md (current sprint) - STATUS.md (where we are) - DEVELOPMENT.md (dev workflow) - DEPLOYMENT.md (deploy procedure) - TESTING.md (test strategy) - DECISIONS.md (ADR index + templates) - .github/CODEOWNERS - .github/workflows/ci.yml Preserves all existing artifacts. Refs: RugMunchMedia/fleet-template
This commit is contained in:
commit
47ba268131
310 changed files with 38429 additions and 0 deletions
43
tests/test_templates.py
Normal file
43
tests/test_templates.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
"""Tests for scraper templates."""
|
||||
|
||||
from template_engine import get_template, list_templates
|
||||
|
||||
|
||||
def test_list_templates() -> None:
|
||||
templates = list_templates()
|
||||
assert len(templates) >= 40 # At least 40 templates
|
||||
assert any("amazon" in t["id"] for t in templates)
|
||||
assert any("linkedin" in t["id"] for t in templates)
|
||||
assert any("github" in t["id"] for t in templates)
|
||||
|
||||
|
||||
def test_get_amazon_template() -> None:
|
||||
t = get_template("amazon-product")
|
||||
assert t is not None
|
||||
assert t["name"] == "Amazon Product"
|
||||
assert "schema" in t
|
||||
assert len(t["schema"]["fields"]) > 5
|
||||
|
||||
|
||||
def test_get_linkedin_template() -> None:
|
||||
t = get_template("linkedin-profile")
|
||||
assert t is not None
|
||||
assert "profile" in t["name"].lower()
|
||||
|
||||
|
||||
def test_get_nonexistent() -> None:
|
||||
t = get_template("nonexistent-site-12345")
|
||||
assert t is None
|
||||
|
||||
|
||||
def test_templates_have_categories() -> None:
|
||||
templates = list_templates()
|
||||
categories = {t["category"] for t in templates}
|
||||
assert "ecommerce" in categories
|
||||
assert "professional" in categories
|
||||
|
||||
|
||||
def test_templates_have_icons() -> None:
|
||||
templates = list_templates()
|
||||
for t in templates:
|
||||
assert t.get("icon"), f"Template {t['id']} missing icon"
|
||||
Loading…
Add table
Add a link
Reference in a new issue