The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
test(ai): replay the archivedAt writability upgrade after the agent history spec rebuilds the chat objects (#26934)
Félix Malfait42bb2bd8f964
diff --git a/packages/twenty-server/test/integration/upgrade/suites/2-42-workspace-command-1789914239896-migrate-agent-history-to-workspace.integration-spec.ts b/packages/twenty-server/test/integration/upgrade/suites/2-42-workspace-command-1789914239896-migrate-agent-history-to-workspace.integration-spec.tsindex bf84203256b..b8e762c7eb4 100644--- a/packages/twenty-server/test/integration/upgrade/suites/2-42-workspace-command-1789914239896-migrate-agent-history-to-workspace.integration-spec.ts+++ b/packages/twenty-server/test/integration/upgrade/suites/2-42-workspace-command-1789914239896-migrate-agent-history-to-workspace.integration-spec.ts@@ -1,5 +1,6 @@import { type EnableCommonRecordSharingCommand } from 'src/database/commands/upgrade-version-command/2-43/2-43-workspace-command-1790312694997-enable-common-record-sharing.command';import { type AddWorkflowRunToChatThreadsCommand } from 'src/database/commands/upgrade-version-command/2-44/2-44-workspace-command-1790607161319-add-workflow-run-to-chat-threads.command';+import { type OpenAgentChatThreadArchivedAtWritabilityCommand } from 'src/database/commands/upgrade-version-command/2-44/2-44-workspace-command-1790672076234-open-agent-chat-thread-archived-at-writability.command';import { type AddInputAskObjectCommand } from 'src/database/commands/upgrade-version-command/2-44/2-44-workspace-command-1790681093095-add-input-ask-object.command';import { randomUUID } from 'node:crypto';import { STANDARD_OBJECTS } from 'twenty-shared/metadata';@@ -254,11 +255,14 @@ describe('versioned agent history upgrade (integration)', () => {options: {},});// The history objects were rebuilt as 2.42 leaves them; replay the later- // upgrades that link threads to runs and asks for the suites that follow.+ // upgrades that change them, in order, for the suites that follow.for (const laterCommand of [getAppProviderByClassName<AddWorkflowRunToChatThreadsCommand>('AddWorkflowRunToChatThreadsCommand',),+ getAppProviderByClassName<OpenAgentChatThreadArchivedAtWritabilityCommand>(+ 'OpenAgentChatThreadArchivedAtWritabilityCommand',+ ),getAppProviderByClassName<AddInputAskObjectCommand>('AddInputAskObjectCommand',),