Skip to content

Commit 69f26a3

Browse files
committed
test: cover commandless interaction cleanup
1 parent 070ee02 commit 69f26a3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎src/daemon/handlers/__tests__/interaction-touch-response.test.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { test, expect, vi, beforeEach } from 'vitest';
22
import { attachRefs } from '@agent-device/kernel/snapshot';
33
import { makeSessionStore } from '../../../__tests__/test-utils/store-factory.ts';
44
import { handleInteractionCommands } from '../interaction.ts';
5+
import { transformTouchResponseData } from '../interaction-touch-response.ts';
56
import {
67
getRuntimeBindings,
78
mockFillPoint,
@@ -72,6 +73,21 @@ beforeEach(() => {
7273
mockRunAppleRunnerCommand.mockResolvedValue({});
7374
});
7475

76+
test('commandless longpress response omits internal interaction diagnostics', () => {
77+
expect(
78+
transformTouchResponseData({
79+
flags: {},
80+
data: {
81+
currentUptimeMs: 900,
82+
gestureStartUptimeMs: 100,
83+
gestureEndUptimeMs: 800,
84+
sequenceResults: [{ index: 0, success: true }],
85+
completedSteps: 1,
86+
},
87+
}),
88+
).toEqual({ completedSteps: 1 });
89+
});
90+
7591
test('press @ref --verify surfaces evidence through the interactionResultExtra allowlist', async () => {
7692
const sessionStore = makeSessionStore();
7793
const sessionName = 'verify-press';

0 commit comments

Comments
 (0)