(keys, delay = 10)
| 23 | // Simulate entering a series of keys with `delay` milliseconds in between |
| 24 | // keystrokes. |
| 25 | async function keySequence(keys, delay = 10) { |
| 26 | for (const nextKey of keys.split(' ')) { |
| 27 | document.dispatchEvent(new KeyboardEvent('keydown', {key: nextKey})) |
| 28 | await wait(delay) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | describe('hotkey', function () { |
| 33 | beforeEach(function () { |