From 880ac6037c91b62b2c6c75b0112eefc0540c5bab Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Mon, 24 Jan 2022 17:04:50 +0100 Subject: [PATCH] Fix scripting test related to keystroke event --- test/unit/scripting_spec.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/unit/scripting_spec.js b/test/unit/scripting_spec.js index 0b5cd6490..c17a1ccd4 100644 --- a/test/unit/scripting_spec.js +++ b/test/unit/scripting_spec.js @@ -1168,11 +1168,25 @@ describe("Scripting", function () { value: "3F?", change: "0", name: "Keystroke", - willCommit: true, + willCommit: false, selStart: 3, selEnd: 3, }); expect(send_queue.has(refId)).toEqual(false); + + await sandbox.dispatchEventInSandbox({ + id: refId, + value: "3F?0", + name: "Keystroke", + willCommit: true, + selStart: 4, + selEnd: 4, + }); + expect(send_queue.has(refId)).toEqual(true); + expect(send_queue.get(refId)).toEqual({ + id: refId, + valueAsString: "3F?0", + }); }); });