From 2ba263cb7a7d792041c518a30306e22129148fb4 Mon Sep 17 00:00:00 2001 From: Rob Stupay Date: Mon, 1 Jul 2019 11:48:09 +0200 Subject: [PATCH] update test --- test-browser/commands/executeScript.js | 1 + test-browser/commands/journalLastChild.js | 9 +++++---- test-browser/tests/console.js | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test-browser/commands/executeScript.js b/test-browser/commands/executeScript.js index 734a419e7a..c668411726 100644 --- a/test-browser/commands/executeScript.js +++ b/test-browser/commands/executeScript.js @@ -5,6 +5,7 @@ class ExecuteScript extends EventEmitter { this.api .click('#terminalCli') .keys(script) + .keys(this.api.Keys.ENTER) .perform(() => { this.emit('complete') }) diff --git a/test-browser/commands/journalLastChild.js b/test-browser/commands/journalLastChild.js index cc6a5fd896..81de8e4cde 100644 --- a/test-browser/commands/journalLastChild.js +++ b/test-browser/commands/journalLastChild.js @@ -2,10 +2,11 @@ const EventEmitter = require('events') class JournalLastChild extends EventEmitter { command (val) { - - this.api.assert.containsText('#journal div:last-child span.text-info', val).perform(() => { - this.emit('complete') - }) + this.api + .waitForElementVisible('#journal div:last-child span.text-info', 10000) + .assert.containsText('#journal div:last-child span.text-info', val).perform(() => { + this.emit('complete') + }) return this } } diff --git a/test-browser/tests/console.js b/test-browser/tests/console.js index 4dd424de0a..5a31c9dcad 100644 --- a/test-browser/tests/console.js +++ b/test-browser/tests/console.js @@ -9,8 +9,7 @@ module.exports = { 'SimpleExecutionConsole': function (browser) { browser .waitForElementVisible('#terminalCli', 10000) - .executeScript(['\uE01B','\uE025','\uE01B','\uE006','\uE006','\uE006']) - .waitForElementVisible('#journal div:last-child span.text-info', 10000) + .executeScript('1+1') .journalLastChild('2') .end() },