From 05cd906c7fd063394189c200451acbe1aaa943be Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 13 Feb 2020 07:48:10 +0000 Subject: [PATCH] Updated executeScript to use data-attributes --- src/app/panels/terminal.js | 1 + test-browser/commands/executeScript.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 7db0dfe53c..f9ea36f932 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -120,6 +120,7 @@ class Terminal extends Plugin { self._view.input.setAttribute('spellcheck', 'false') self._view.input.setAttribute('contenteditable', 'true') self._view.input.setAttribute('id', 'terminalCliInput') + self._view.input.setAttribute('data-id', 'terminalCliInput') self._view.input.innerText = '\n' self._view.cli = yo` diff --git a/test-browser/commands/executeScript.js b/test-browser/commands/executeScript.js index b33370ae98..cfa8d9b562 100644 --- a/test-browser/commands/executeScript.js +++ b/test-browser/commands/executeScript.js @@ -3,8 +3,8 @@ const EventEmitter = require('events') class ExecuteScript extends EventEmitter { command (script) { this.api - .clearValue('#terminalCliInput') - .click('#terminalCli') + .clearValue('span[data-id="terminalCliInput"]') + .click('div[data-id="terminalCli"]') .keys(script) .keys(this.api.Keys.ENTER) .keys(this.api.Keys.ENTER) // that's a bug... sometimes we need to press 2 times to execute a command