Files
devplacepy/tests/e2e/tools/deepsearch/index.py
T
retoor d10f1af118
DevPlace CI / test (push) Failing after 2m13s
feat: add seo_meta service for AI-generated SEO metadata with CLI management and database layer
Implement a new `SeoMetaService` subservice that generates clean SEO title/description/keywords for published content items, distinct from the existing SEO diagnostics auditor. Add `seo_metadata` polymorphic table with soft-delete support, batch query methods, and usage tracking. Extend the CLI with `seo-meta prune` and `seo-meta clear` commands for job row lifecycle management. Wire `schedule_seo_meta_for_table` into content creation and editing flows in `content.py`. Document the new service in `AGENTS.md` and `README.md`, including the `extra_head` site setting for custom `<head>` injection.
2026-06-19 20:15:22 +00:00

47 lines
1.9 KiB
Python

# retoor <retoor@molodetz.nl>
from tests.conftest import BASE_URL
from devplacepy.database import get_table, refresh_snapshot
def _clear_deepsearch_jobs():
refresh_snapshot()
jobs = get_table("jobs")
for row in list(jobs.find(kind="deepsearch")):
jobs.delete(uid=row["uid"])
sessions = get_table("deepsearch_sessions")
for row in list(sessions.find()):
sessions.delete(uid=row["uid"])
def test_deepsearch_page_loads(page, app_server):
page.goto(f"{BASE_URL}/tools/deepsearch", wait_until="domcontentloaded")
page.locator("[data-deepsearch-tool]").wait_for(state="visible")
page.locator("[data-deepsearch-form] textarea[name='query']").wait_for(state="visible")
page.locator("[data-deepsearch-run]").wait_for(state="visible")
def test_progress_timeline_has_all_phases(page, app_server):
page.goto(f"{BASE_URL}/tools/deepsearch", wait_until="domcontentloaded")
timeline = page.locator("[data-deepsearch-timeline]")
timeline.wait_for(state="attached")
for phase in ("planning", "searching", "crawling", "indexing", "analysis", "synthesis"):
assert timeline.locator(f"[data-deepsearch-phase='{phase}']").count() == 1
def test_form_submit_reveals_live_progress(alice):
page, _user = alice
try:
page.goto(f"{BASE_URL}/tools/deepsearch", wait_until="domcontentloaded")
page.locator("[data-deepsearch-form]").wait_for(state="visible")
page.locator("[data-deepsearch-form] textarea[name='query']").fill(
"history of the transistor"
)
page.locator("[data-deepsearch-run]").click()
live = page.locator("[data-deepsearch-live]")
live.wait_for(state="visible")
live.locator("[data-deepsearch-bar]").wait_for(state="attached")
live.locator("[data-deepsearch-status]").wait_for(state="visible")
finally:
_clear_deepsearch_jobs()