Skip to content

Commit 31ca1e4

Browse files
committed
chore: simplify copy commands in tests
1 parent a3abe12 commit 31ca1e4

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

test/webdriverio/test/clipboard_test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ suite('Clipboard test', function () {
122122
await this.browser.pause(PAUSE_TIME);
123123

124124
// Try to cut block while field editor is open
125-
await this.browser.keys(Key.Ctrl);
126-
await this.browser.keys('x');
127-
await this.browser.keys(Key.Ctrl); // release ctrl key
125+
await this.browser.keys([Key.Ctrl, 'x']);
128126

129127
// Block is not deleted
130128
chai.assert.isTrue(

test/webdriverio/test/keyboard_mode_test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ suite(
8080
// Make sure we're on a copyable block so that copy occurs
8181
await focusOnBlock(this.browser, 'controls_if_2');
8282
await this.browser.pause(PAUSE_TIME);
83-
await this.browser.keys(Key.Ctrl);
84-
await this.browser.keys('c');
85-
await this.browser.keys(Key.Ctrl); // release ctrl key
83+
await this.browser.keys([Key.Ctrl, 'c']);
8684
await this.browser.pause(PAUSE_TIME);
8785

8886
chai.assert.isFalse(await isKeyboardNavigating(this.browser));
@@ -92,9 +90,7 @@ suite(
9290
});
9391

9492
await this.browser.pause(PAUSE_TIME);
95-
await this.browser.keys(Key.Ctrl);
96-
await this.browser.keys('c');
97-
await this.browser.keys(Key.Ctrl); // release ctrl key
93+
await this.browser.keys([Key.Ctrl, 'c']);
9894
await this.browser.pause(PAUSE_TIME);
9995

10096
chai.assert.isTrue(await isKeyboardNavigating(this.browser));

0 commit comments

Comments
 (0)