Phase 1C: Frontend unified contact UI
This commit is contained in:
@@ -1012,7 +1012,7 @@ async def test_gather_context_mail(db_session: AsyncSession):
|
||||
@pytest.mark.asyncio
|
||||
async def test_gather_context_company(db_session: AsyncSession):
|
||||
"""gather_context for company collects data."""
|
||||
from app.models.company import Company
|
||||
from app.models.contact import Contact as Company
|
||||
from app.models.tenant import Tenant
|
||||
from app.models.user import User
|
||||
from app.core.auth import hash_password
|
||||
@@ -1041,8 +1041,8 @@ async def test_gather_context_company(db_session: AsyncSession):
|
||||
db_session.add(company)
|
||||
await db_session.commit()
|
||||
|
||||
context = await gather_context(db_session, "company", company.id, tenant.id)
|
||||
assert context["entity_type"] == "company"
|
||||
context = await gather_context(db_session, "contact", company.id, tenant.id)
|
||||
assert context["entity_type"] == "contact"
|
||||
assert context["entity_id"] == str(company.id)
|
||||
assert "company" in context
|
||||
assert "contacts" in context
|
||||
@@ -1463,7 +1463,7 @@ async def test_suggestions_filter_by_entity_type(
|
||||
s_company = ProactiveSuggestion(
|
||||
tenant_id=seed["tenant_a"].id,
|
||||
user_id=seed["admin_a"].id,
|
||||
entity_type="company",
|
||||
entity_type="contact",
|
||||
entity_id=uuid.uuid4(),
|
||||
suggestion_type="info",
|
||||
title="Company Suggestion",
|
||||
|
||||
Reference in New Issue
Block a user