mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-04 00:06:39 +00:00
* feat: give ai agent drafts their own agent draft kind * feat: keep an agent's deployed identity when a deploy keeps one unnamed * refactor: read agent drafts by their kind instead of probing resources * feat: give the agent editor the script and flow editors' draft controls * docs: describe agent drafts as their own draft kind * fix: always autosave an agent edited in a session tab * revert: keep naming an agent's deployed identity on the client Deploying an agent draft goes back to sending the deployed identity it keeps, as main does, instead of the server filling it in when a write asks to keep one it does not name. Every other kind keeps only an identity a write names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep an agent's deployed identity when Edit as JSON saves its draft The JSON view now loads the agent's draft, which never carries the identity, so a save restates the deployed one as a draft deploy does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: type the deployed agent value read in the resource editor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: keep agent drafts as resource drafts, typed by the drafts listing Drops the agent draft kind (its enum value, migrations, kind check and the draft-kind rules mirrored in Rust and TypeScript). Agent drafts stay resource drafts, private to their author like every resource draft. /drafts/list now reports a resource draft's resource_type (the deployed row's, else the one the draft names), and for an agent its description as summary and its path as draft_path, so the Review & Deploy page, the session changes bar and the session's agent list tell agents apart without fetching each draft. The agent editor keeps the script and flow editors' draft controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the agent role check and key the agent editor's draft prompts by resource Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: place the agent editor's draft status as the script and flow editors do On its own page it leads the actions, followed by Diff; in the dialog and the session pane, which draw their own bar, it sits beside the agent's name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: drop the agent editor's other users' drafts handling until agent drafts are shared Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: ask before leaving the agent dialog with edits auto-save has not saved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: draft owner avatar and add-to-AI-context on agent rows, as on script and flow rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 * feat: agents duplicate, share from their editor and Recent card, and appear in the chat's @ picker Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 * fix: an agent's draft badge opens the agent editor and names it an agent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 * fix: offer +@ on an agent's Recent card while the composer is open Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 * fix: keep the editor header's kind to the items it heads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 * fix: type the not-found header's kind as the editor header takes it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4rzFn8gXk7QbT6BeF4Nq2 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
391 lines
16 KiB
TypeScript
391 lines
16 KiB
TypeScript
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
import { draftBaseIsStale, deployDraft, getDraftDiffValues } from './utils_draft_deploy'
|
|
|
|
vi.mock('$lib/gen', () => ({
|
|
ScriptService: { getScriptByPath: vi.fn(), createScript: vi.fn() },
|
|
FlowService: { getFlowByPath: vi.fn(), createFlow: vi.fn(), updateFlow: vi.fn() },
|
|
DraftService: { deleteDraft: vi.fn() },
|
|
AppService: { getAppByPath: vi.fn(), createApp: vi.fn() },
|
|
VariableService: { getVariable: vi.fn(), createVariable: vi.fn(), updateVariable: vi.fn() },
|
|
ResourceService: { getResource: vi.fn(), updateResource: vi.fn(), createResource: vi.fn() },
|
|
ScheduleService: {},
|
|
HttpTriggerService: {},
|
|
WebsocketTriggerService: {},
|
|
PostgresTriggerService: {},
|
|
KafkaTriggerService: {},
|
|
NatsTriggerService: {},
|
|
MqttTriggerService: {},
|
|
AmqpTriggerService: {},
|
|
SqsTriggerService: {},
|
|
GcpTriggerService: {},
|
|
AzureTriggerService: {},
|
|
EmailTriggerService: {}
|
|
}))
|
|
vi.mock('$lib/userDraftDbSyncer.svelte', () => ({
|
|
UserDraftDbSyncer: { save: vi.fn(), recordRemoteSync: vi.fn(), onAnySaved: vi.fn() }
|
|
}))
|
|
vi.mock('$lib/workspaceDrafts.svelte', () => ({ invalidateWorkspaceDrafts: vi.fn() }))
|
|
vi.mock('$lib/workspaceComparison', () => ({ invalidateWorkspaceComparison: vi.fn() }))
|
|
vi.mock('$lib/localDraftHints.svelte', () => ({ setLocalDraftHint: vi.fn() }))
|
|
vi.mock('$lib/rawAppDeploy', () => ({ deployRawAppDraft: vi.fn() }))
|
|
vi.mock('$lib/components/raw_apps/utils', () => ({ canonicalRawAppDiffValue: vi.fn() }))
|
|
vi.mock('$lib/appDiffSides', () => ({ classicAppDraftParts: vi.fn() }))
|
|
vi.mock('$lib/utils_deployable', () => ({ TRIGGER_RUNTIME_IGNORE: [] }))
|
|
vi.mock('$lib/components/apps/editor/appPolicy', () => ({
|
|
updatePolicy: vi.fn(async (_app: unknown, policy: unknown) => policy)
|
|
}))
|
|
|
|
import { ScriptService, FlowService, VariableService, ResourceService, AppService } from '$lib/gen'
|
|
import { UserDraftDbSyncer } from '$lib/userDraftDbSyncer.svelte'
|
|
import { classicAppDraftParts } from '$lib/appDiffSides'
|
|
|
|
// draftBaseIsStale compares a draft's base pointer against the deployed head
|
|
// of the item it was fetched with (`get_draft=true`). Shared by CompareDrafts
|
|
// and the session Edits drawer — a regression here silently hides (or
|
|
// fabricates) the "started from an older deployed version" warning.
|
|
|
|
describe('draftBaseIsStale', () => {
|
|
it('script: stale iff draft_base differs from the deployed hash', () => {
|
|
expect(draftBaseIsStale('script', { hash: 'v2', draft_base: 'v1' })).toBe(true)
|
|
expect(draftBaseIsStale('script', { hash: 'v2', draft_base: 'v2' })).toBe(false)
|
|
})
|
|
|
|
it('script: no base or no head → not stale (nothing to compare)', () => {
|
|
expect(draftBaseIsStale('script', { hash: 'v2', draft: {} })).toBe(false)
|
|
expect(draftBaseIsStale('script', { draft_base: 'v1' })).toBe(false)
|
|
})
|
|
|
|
it('flow: compares draft_base against the deployed version_id as text', () => {
|
|
expect(draftBaseIsStale('flow', { version_id: 7, draft_base: '5' })).toBe(true)
|
|
expect(draftBaseIsStale('flow', { version_id: 7, draft_base: '7' })).toBe(false)
|
|
expect(draftBaseIsStale('flow', { version_id: 7 })).toBe(false)
|
|
})
|
|
|
|
it('app/raw_app: compares draft_base against the last of versions', () => {
|
|
expect(draftBaseIsStale('app', { versions: [1, 2, 3], draft_base: '2' })).toBe(true)
|
|
expect(draftBaseIsStale('raw_app', { versions: [1, 2, 3], draft_base: '3' })).toBe(false)
|
|
expect(draftBaseIsStale('app', { versions: [], draft_base: '2' })).toBe(false)
|
|
})
|
|
|
|
it('no draft on the response → not stale', () => {
|
|
expect(draftBaseIsStale('script', { hash: 'v2' })).toBe(false)
|
|
expect(draftBaseIsStale('script', undefined)).toBe(false)
|
|
})
|
|
})
|
|
|
|
// Without preserve_on_behalf_of the backend rewrites on_behalf_of_email to the
|
|
// deploying user, so deploying a draft silently re-points the runnable's
|
|
// identity.
|
|
|
|
describe('deployDraft preserves on_behalf_of', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
it('script: forwards the flag when the draft carries an on_behalf_of_email', async () => {
|
|
vi.mocked(ScriptService.getScriptByPath).mockResolvedValueOnce({
|
|
hash: 'v1',
|
|
draft: { path: 'f/admin/send_email', on_behalf_of_email: 'alice@windmill.dev' }
|
|
} as any)
|
|
|
|
expect(await deployDraft('script', 'f/admin/send_email', 'ws')).toEqual({ success: true })
|
|
expect(ScriptService.createScript).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({
|
|
on_behalf_of_email: 'alice@windmill.dev',
|
|
preserve_on_behalf_of: true
|
|
})
|
|
})
|
|
)
|
|
})
|
|
|
|
it('script: omits the flag when the draft has no on_behalf_of_email', async () => {
|
|
vi.mocked(ScriptService.getScriptByPath).mockResolvedValueOnce({
|
|
hash: 'v1',
|
|
draft: { path: 'f/admin/send_email' }
|
|
} as any)
|
|
|
|
await deployDraft('script', 'f/admin/send_email', 'ws')
|
|
expect(ScriptService.createScript).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({ preserve_on_behalf_of: undefined })
|
|
})
|
|
)
|
|
})
|
|
|
|
it('flow: forwards the flag when the draft carries an on_behalf_of_email', async () => {
|
|
vi.mocked(FlowService.getFlowByPath).mockResolvedValueOnce({
|
|
draft: { path: 'f/admin/notify', value: {}, on_behalf_of_email: 'alice@windmill.dev' }
|
|
} as any)
|
|
|
|
expect(await deployDraft('flow', 'f/admin/notify', 'ws')).toEqual({ success: true })
|
|
expect(FlowService.updateFlow).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({
|
|
on_behalf_of_email: 'alice@windmill.dev',
|
|
preserve_on_behalf_of: true
|
|
})
|
|
})
|
|
)
|
|
})
|
|
|
|
it('agent: claims the deployed identity, which its draft never carries', async () => {
|
|
vi.mocked(ResourceService.getResource).mockResolvedValueOnce({
|
|
path: 'f/support/triage_agent',
|
|
resource_type: 'ai_agent',
|
|
value: { system_prompt: 'deployed', on_behalf_of: 'u/alice' },
|
|
draft: { path: 'f/support/triage_agent', args: { system_prompt: 'drafted' } }
|
|
} as any)
|
|
|
|
expect(await deployDraft('resource', 'f/support/triage_agent', 'ws')).toEqual({ success: true })
|
|
expect(ResourceService.updateResource).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({
|
|
value: { system_prompt: 'drafted', on_behalf_of: 'u/alice' },
|
|
preserve_on_behalf_of: true
|
|
})
|
|
})
|
|
)
|
|
})
|
|
})
|
|
|
|
// The backend runs an app without `sandbox` same-origin with each viewer's session, and a draft
|
|
// saved before drafts carried the policy has none to give.
|
|
describe('deployDraft: draft-only classic app', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
it('creates the app sandboxed when its draft carries no policy', async () => {
|
|
vi.mocked(AppService.getAppByPath).mockResolvedValueOnce({ draft: { grid: [] } } as any)
|
|
vi.mocked(classicAppDraftParts).mockReturnValueOnce({ value: { grid: [] } } as any)
|
|
|
|
expect(await deployDraft('app', 'u/alice/dash', 'ws', { draftOnly: true })).toEqual({
|
|
success: true
|
|
})
|
|
expect(AppService.createApp).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({
|
|
policy: expect.objectContaining({ execution_mode: 'publisher', sandbox: true })
|
|
})
|
|
})
|
|
)
|
|
})
|
|
|
|
it('shows the sandboxed policy it deploys in the diff', async () => {
|
|
vi.mocked(AppService.getAppByPath).mockResolvedValueOnce({ draft: { grid: [] } } as any)
|
|
vi.mocked(classicAppDraftParts)
|
|
.mockReturnValueOnce({ value: {} } as any)
|
|
.mockReturnValueOnce({ value: { grid: [] } } as any)
|
|
|
|
const { draft } = await getDraftDiffValues('app', 'u/alice/dash', 'ws', true)
|
|
expect(draft.policy).toEqual({ sandbox: true })
|
|
})
|
|
})
|
|
|
|
// Muting writes to the deployed row at once, so a draft saved before it holds a stale copy, and
|
|
// the backend unmutes on a deploy that sends `false`.
|
|
describe('deployDraft keeps the deployed mute flag', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
const muted = (call: any) => call[0].requestBody.ws_error_handler_muted
|
|
|
|
it('flow and script: sends the deployed flag over a stale draft', async () => {
|
|
vi.mocked(FlowService.getFlowByPath).mockResolvedValueOnce({
|
|
ws_error_handler_muted: true,
|
|
draft: { path: 'f/ops/sync', value: {}, ws_error_handler_muted: false }
|
|
} as any)
|
|
await deployDraft('flow', 'f/ops/sync', 'ws')
|
|
expect(muted(vi.mocked(FlowService.updateFlow).mock.calls[0])).toBe(true)
|
|
|
|
vi.mocked(ScriptService.getScriptByPath).mockResolvedValueOnce({
|
|
hash: 'v1',
|
|
ws_error_handler_muted: true,
|
|
draft: { path: 'f/ops/job', ws_error_handler_muted: false }
|
|
} as any)
|
|
await deployDraft('script', 'f/ops/job', 'ws')
|
|
expect(muted(vi.mocked(ScriptService.createScript).mock.calls[0])).toBe(true)
|
|
})
|
|
|
|
it('draft-only flow: sends the flag the draft was muted with', async () => {
|
|
vi.mocked(FlowService.getFlowByPath).mockResolvedValueOnce({
|
|
no_deployed: true,
|
|
draft: { path: 'f/ops/new', value: {}, ws_error_handler_muted: true }
|
|
} as any)
|
|
await deployDraft('flow', 'f/ops/new', 'ws', { draftOnly: true })
|
|
expect(muted(vi.mocked(FlowService.createFlow).mock.calls[0])).toBe(true)
|
|
})
|
|
})
|
|
|
|
// The deploy bodies are built field by field, so a forgotten field is dropped silently.
|
|
describe('deployDraft variable value_valid_until', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
const DATE = '2027-03-15T08:30:00.000Z'
|
|
|
|
function mockVariable(deployedExpiry: string | undefined, draftExpiry: string | undefined) {
|
|
vi.mocked(VariableService.getVariable).mockResolvedValueOnce({
|
|
path: 'u/admin/key',
|
|
value: 'v',
|
|
is_secret: false,
|
|
description: '',
|
|
value_valid_until: deployedExpiry,
|
|
draft: {
|
|
path: 'u/admin/key',
|
|
variable: { value: 'v', is_secret: false, description: '' },
|
|
value_valid_until: draftExpiry
|
|
}
|
|
} as any)
|
|
}
|
|
|
|
const updateBody = () =>
|
|
vi.mocked(VariableService.updateVariable).mock.calls[0][0].requestBody as any
|
|
|
|
it('sends a date the draft set on a variable that had none', async () => {
|
|
mockVariable(undefined, DATE)
|
|
await deployDraft('variable', 'u/admin/key', 'ws')
|
|
expect(updateBody().value_valid_until).toBe(DATE)
|
|
})
|
|
|
|
it('sends null when the draft cleared the deployed date', async () => {
|
|
mockVariable(DATE, undefined)
|
|
await deployDraft('variable', 'u/admin/key', 'ws')
|
|
expect(updateBody().value_valid_until).toBeNull()
|
|
})
|
|
|
|
it('omits it when the draft leaves the deployed date alone', async () => {
|
|
mockVariable(DATE, DATE)
|
|
await deployDraft('variable', 'u/admin/key', 'ws')
|
|
expect(updateBody().value_valid_until).toBeUndefined()
|
|
})
|
|
|
|
it('omits it when the draft spells the deployed moment differently', async () => {
|
|
mockVariable('2027-03-15T08:30:00Z', DATE)
|
|
await deployDraft('variable', 'u/admin/key', 'ws')
|
|
expect(updateBody().value_valid_until).toBeUndefined()
|
|
})
|
|
|
|
it('carries the date onto a draft-only variable', async () => {
|
|
mockVariable(undefined, DATE)
|
|
await deployDraft('variable', 'u/admin/key', 'ws', { draftOnly: true })
|
|
const body = vi.mocked(VariableService.createVariable).mock.calls[0][0].requestBody as any
|
|
expect(body.value_valid_until).toBe(DATE)
|
|
})
|
|
})
|
|
|
|
// The backend skips the dependency job when `lock` is set, so a draft that inherited the
|
|
// deployed lock would deploy new content against the old lockfile.
|
|
describe('deployDraft: script lock', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
it('never sends the draft lock, so the backend relocks', async () => {
|
|
vi.mocked(ScriptService.getScriptByPath).mockResolvedValueOnce({
|
|
hash: 'v1',
|
|
draft: {
|
|
path: 'f/admin/fetch',
|
|
content: 'import requests',
|
|
lock: 'certifi==2024.1.1',
|
|
lock_error_logs: 'old error'
|
|
}
|
|
} as any)
|
|
|
|
await deployDraft('script', 'f/admin/fetch', 'ws')
|
|
const body = vi.mocked(ScriptService.createScript).mock.calls[0][0].requestBody
|
|
expect(body).not.toHaveProperty('lock')
|
|
expect(body).not.toHaveProperty('lock_error_logs')
|
|
})
|
|
|
|
it('flow: drops the lock of a step whose code differs from the deployed one only', async () => {
|
|
const step = (id: string, content: string) => ({
|
|
id,
|
|
value: { type: 'rawscript', language: 'python3', content, lock: 'requests==2.0' }
|
|
})
|
|
vi.mocked(FlowService.getFlowByPath).mockResolvedValueOnce({
|
|
value: { modules: [step('edited', 'import requests'), step('kept', 'import requests')] },
|
|
draft: {
|
|
path: 'f/admin/flow',
|
|
value: { modules: [step('edited', 'import yaml'), step('kept', 'import requests')] }
|
|
}
|
|
} as any)
|
|
|
|
await deployDraft('flow', 'f/admin/flow', 'ws')
|
|
const [edited, kept] = vi.mocked(FlowService.updateFlow).mock.calls[0][0].requestBody.value
|
|
.modules as any[]
|
|
expect(edited.value).not.toHaveProperty('lock')
|
|
expect(kept.value.lock).toBe('requests==2.0')
|
|
})
|
|
|
|
// A never-deployed flow is often a copy or an import, whose locks match its code.
|
|
it('flow: keeps every lock when nothing is deployed to compare against', async () => {
|
|
const step = { id: 'copied', value: { type: 'rawscript', content: 'x', lock: 'requests==2.0' } }
|
|
vi.mocked(FlowService.getFlowByPath).mockResolvedValueOnce({
|
|
no_deployed: true,
|
|
value: { modules: [step] },
|
|
draft: { path: 'f/admin/copy', value: { modules: [step] } }
|
|
} as any)
|
|
|
|
await deployDraft('flow', 'f/admin/copy', 'ws', { draftOnly: true })
|
|
const [copied] = vi.mocked(FlowService.createFlow).mock.calls[0][0].requestBody.value
|
|
.modules as any[]
|
|
expect(copied.value.lock).toBe('requests==2.0')
|
|
})
|
|
})
|
|
|
|
// The resource branch reads the item again when the deploy lands, and falls back to the deployed
|
|
// row when the draft has gone. That row keeps its value under `value` and carries no `args` at
|
|
// all, so reading it as a draft (`value: d.args ?? {}`) would replace a live resource with `{}`.
|
|
describe('deployDraft: resource with no draft', () => {
|
|
beforeEach(() => vi.clearAllMocks())
|
|
|
|
it('writes nothing rather than `{}` over the deployed value', async () => {
|
|
vi.mocked(ResourceService.getResource).mockResolvedValueOnce({
|
|
path: 'f/support/triage_agent',
|
|
resource_type: 'ai_agent',
|
|
value: { system_prompt: 'deployed' }
|
|
} as any)
|
|
|
|
// `noop` is what lets a caller deploying one specific draft tell "nothing to promote" apart
|
|
// from "deployed", instead of reporting an agent as deployed that was never written.
|
|
expect(await deployDraft('resource', 'f/support/triage_agent', 'ws')).toEqual({
|
|
success: true,
|
|
noop: true
|
|
})
|
|
expect(ResourceService.updateResource).not.toHaveBeenCalled()
|
|
expect(ResourceService.createResource).not.toHaveBeenCalled()
|
|
// Nor does it touch the draft row. There was none of this user's to delete, so the only row
|
|
// the cleanup could reach is one written after the read: an edit destroyed without ever
|
|
// having been deployed. Clearing the baseline would be the same bug by another route, since
|
|
// a delete with no baseline is the unconditional one.
|
|
expect(UserDraftDbSyncer.save).not.toHaveBeenCalled()
|
|
expect(UserDraftDbSyncer.recordRemoteSync).not.toHaveBeenCalled()
|
|
})
|
|
|
|
it('still deploys normally when the draft is there, and keys the cleanup to the row it read', async () => {
|
|
vi.mocked(ResourceService.getResource).mockResolvedValueOnce({
|
|
path: 'f/support/triage_agent',
|
|
resource_type: 'ai_agent',
|
|
value: { system_prompt: 'deployed' },
|
|
draft_saved_at: '2026-01-01T00:00:00Z',
|
|
draft: { path: 'f/support/triage_agent', args: { system_prompt: 'drafted' } }
|
|
} as any)
|
|
|
|
expect(await deployDraft('resource', 'f/support/triage_agent', 'ws')).toEqual({ success: true })
|
|
expect(ResourceService.updateResource).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
requestBody: expect.objectContaining({ value: { system_prompt: 'drafted' } })
|
|
})
|
|
)
|
|
// The draft delete that follows is conditional on this baseline. With no baseline the backend
|
|
// deletes unconditionally, destroying a draft saved between the read and the delete without
|
|
// ever having deployed it, so the timestamp has to be the one from the row just promoted.
|
|
expect(UserDraftDbSyncer.recordRemoteSync).toHaveBeenCalledWith(
|
|
{ workspace: 'ws', itemKind: 'resource', path: 'f/support/triage_agent' },
|
|
'2026-01-01T00:00:00Z'
|
|
)
|
|
expect(UserDraftDbSyncer.save).toHaveBeenCalledWith(
|
|
expect.objectContaining({ path: 'f/support/triage_agent', value: null, immediate: true })
|
|
)
|
|
// Order is the whole point: a delete issued before the seed carries whatever baseline the tab
|
|
// happened to hold, which for a caller that only read through a listing is none at all.
|
|
expect(vi.mocked(UserDraftDbSyncer.recordRemoteSync).mock.invocationCallOrder[0]).toBeLessThan(
|
|
vi.mocked(UserDraftDbSyncer.save).mock.invocationCallOrder[0]
|
|
)
|
|
})
|
|
})
|