Skip to content

Commit 414a4d8

Browse files
authored
Merge pull request #14489 from calixteman/14488
Fix scripting test related to keystroke event
2 parents b280dff + 880ac60 commit 414a4d8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/unit/scripting_spec.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -1168,11 +1168,25 @@ describe("Scripting", function () {
11681168
value: "3F?",
11691169
change: "0",
11701170
name: "Keystroke",
1171-
willCommit: true,
1171+
willCommit: false,
11721172
selStart: 3,
11731173
selEnd: 3,
11741174
});
11751175
expect(send_queue.has(refId)).toEqual(false);
1176+
1177+
await sandbox.dispatchEventInSandbox({
1178+
id: refId,
1179+
value: "3F?0",
1180+
name: "Keystroke",
1181+
willCommit: true,
1182+
selStart: 4,
1183+
selEnd: 4,
1184+
});
1185+
expect(send_queue.has(refId)).toEqual(true);
1186+
expect(send_queue.get(refId)).toEqual({
1187+
id: refId,
1188+
valueAsString: "3F?0",
1189+
});
11761190
});
11771191
});
11781192

0 commit comments

Comments
 (0)