mirror of
https://github.com/keymanapp/keyman.git
synced 2026-11-03 09:37:47 +00:00
test(web): address code review comments
This commit is contained in:
parent
8784e0aacf
commit
78cd9f8663
1 changed files with 2 additions and 4 deletions
|
|
@ -172,13 +172,11 @@ function getKeySequences(keys: string): string[][] {
|
|||
export async function pressKeys(page: Page, keys: string): Promise<void> {
|
||||
const keySequences = getKeySequences(keys);
|
||||
for (const keySequence of keySequences) {
|
||||
for (let i = 0; i < keySequence.length - 1; i++) {
|
||||
for (let i = 0; i < keySequence.length; i++) {
|
||||
await page.keyboard.down(keySequence[i]);
|
||||
}
|
||||
await page.keyboard.down(keySequence[keySequence.length - 1]);
|
||||
|
||||
await page.keyboard.up(keySequence[keySequence.length - 1]);
|
||||
for (let i = keySequence.length - 2; i >= 0; i--) {
|
||||
for (let i = keySequence.length - 1; i >= 0; i--) {
|
||||
await page.keyboard.up(keySequence[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue