diff --git a/apps/obsidian/src/utils/__tests__/conceptConversion.test.ts b/apps/obsidian/src/utils/__tests__/conceptConversion.test.ts index 29bf28d1b..48b21a816 100644 --- a/apps/obsidian/src/utils/__tests__/conceptConversion.test.ts +++ b/apps/obsidian/src/utils/__tests__/conceptConversion.test.ts @@ -108,13 +108,19 @@ const NODE_TYPE: DiscourseNode = { describe("discourseNodeSchemaToLocalConcept format", () => { it("publishes the format at the top level of literal content", () => { expect( - discourseNodeSchemaToLocalConcept({ context: CONTEXT, node: NODE_TYPE }), + discourseNodeSchemaToLocalConcept({ + accountLocalId: "account-1", + node: NODE_TYPE, + }), ).toMatchObject({ literal_content: { format: "CLM - {content}" } }); }); it("keeps the other metadata in source data without the format", () => { expect( - discourseNodeSchemaToLocalConcept({ context: CONTEXT, node: NODE_TYPE }), + discourseNodeSchemaToLocalConcept({ + accountLocalId: "account-1", + node: NODE_TYPE, + }), ).toHaveProperty("literal_content.source_data", { shortcut: "C", color: "#7DA13E", diff --git a/apps/obsidian/src/utils/__tests__/syncDgNodesToSupabase.test.ts b/apps/obsidian/src/utils/__tests__/syncDgNodesToSupabase.test.ts index 5ee70c67f..35c56526b 100644 --- a/apps/obsidian/src/utils/__tests__/syncDgNodesToSupabase.test.ts +++ b/apps/obsidian/src/utils/__tests__/syncDgNodesToSupabase.test.ts @@ -169,6 +169,7 @@ describe("what Obsidian sync sends to upsert_concepts", () => { id: "source-type", name: "Source", format: "SRC - {content}", + template: "", ...schemaTimes, }; const IMPORTED_EVIDENCE_TYPE: DiscourseNode = { @@ -602,10 +603,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("sends a node type as a schema Concept with its format, settings and template", () => { expect(sentRow("claim-type")).toStrictEqual({ - space_id: SPACE_ID, source_local_id: "claim-type", is_schema: true, - author_id: USER_ID, + author_local_id: ACCOUNT_LOCAL_ID, name: "Claim", description: "An assertion that evidence can support", created: SCHEMA_CREATED, @@ -628,10 +628,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("sends template_content null for a node type with no template", () => { expect(sentRow("source-type")).toStrictEqual({ - space_id: SPACE_ID, source_local_id: "source-type", is_schema: true, - author_id: USER_ID, + author_local_id: ACCOUNT_LOCAL_ID, name: "Source", created: SCHEMA_CREATED, last_modified: SCHEMA_MODIFIED, @@ -646,10 +645,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("sends an imported node type with its origin RID, authored by this space's user", () => { expect(sentRow("evidence-type")).toStrictEqual({ - space_id: SPACE_ID, source_local_id: "evidence-type", is_schema: true, - author_id: USER_ID, + author_local_id: ACCOUNT_LOCAL_ID, name: "Evidence", created: SCHEMA_CREATED, last_modified: SCHEMA_MODIFIED, @@ -665,10 +663,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("sends a relation type as a schema Concept named by its label", () => { expect(sentRow("cites-type")).toStrictEqual({ - space_id: SPACE_ID, source_local_id: "cites-type", is_schema: true, - author_id: USER_ID, + author_local_id: ACCOUNT_LOCAL_ID, name: "cites", created: SCHEMA_CREATED, last_modified: SCHEMA_MODIFIED, @@ -683,10 +680,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("sends an accepted imported relation type with its origin RID and without its status", () => { expect(sentRow("opposes-type")).toStrictEqual({ - space_id: SPACE_ID, source_local_id: "opposes-type", is_schema: true, - author_id: USER_ID, + author_local_id: ACCOUNT_LOCAL_ID, name: "opposes", created: SCHEMA_CREATED, last_modified: SCHEMA_MODIFIED, @@ -702,10 +698,9 @@ describe("what Obsidian sync sends to upsert_concepts", () => { it("names a relation triple ' -