From a1fef89922a8a5d1b33f847f4533252c474c1eef Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 18 Oct 2017 12:21:24 +0200 Subject: [PATCH] smoke: use pasteboard to edit editor --- test/smoke/src/areas/editor/editor.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/smoke/src/areas/editor/editor.ts b/test/smoke/src/areas/editor/editor.ts index 0a9a238c6f8..b69cfbacc4b 100644 --- a/test/smoke/src/areas/editor/editor.ts +++ b/test/smoke/src/areas/editor/editor.ts @@ -109,12 +109,8 @@ export class Editor { await this.spectron.client.waitForActiveElement(textarea); // https://github.com/Microsoft/vscode/issues/34203#issuecomment-334441786 - for (let i = 0; i < text.length; i++) { - this.spectron.client.spectron.client.keys([text[i], 'NULL']); - await new Promise(c => setTimeout(c, 50)); - } - - // this.spectron.client.spectron.client.keys([text, 'NULL']); + this.spectron.app.electron.clipboard.writeText(text); + this.spectron.app.webContents.paste(); await this.waitForEditorContents(filename, c => c.indexOf(text) > -1, selectorPrefix); }