From 255b5b24d0d4bd0770bb0e6b562b076df4d9a7a6 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 14 Jul 2020 17:01:54 +0100 Subject: [PATCH] Fix ballot tests timeout --- .../test-browser/commands/testFunction.js | 7 +++++-- apps/remix-ide/test-browser/helpers/init.js | 7 +++---- package-lock.json | 15 ++++++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide/test-browser/commands/testFunction.js b/apps/remix-ide/test-browser/commands/testFunction.js index 5813e4e4b6..9b09326ec7 100644 --- a/apps/remix-ide/test-browser/commands/testFunction.js +++ b/apps/remix-ide/test-browser/commands/testFunction.js @@ -5,9 +5,12 @@ class TestFunction extends EventEmitter { command (txHash, expectedValue) { const browser = this.api const logs = {} - const setLog = (index, value) => { logs[Object.keys(logs)[index]] = value } + const setLog = (index, value) => { logs[Object.keys(logs)[index]] = typeof value === 'string' ? value.trim() : value } - browser.waitForElementVisible(`*[data-id="txLogger${txHash}"]`) + browser + .waitForElementVisible(`*[data-id="terminalContainer"]`) + .click(`*[data-id="terminalContainer"]`) + .waitForElementVisible(`*[data-id="txLogger${txHash}"]`) .click(`*[data-id="txLogger${txHash}"]`) .waitForElementVisible(`*[data-id="txLoggerTable${txHash}"]`) diff --git a/apps/remix-ide/test-browser/helpers/init.js b/apps/remix-ide/test-browser/helpers/init.js index 3ff14aa712..45277c7ff0 100644 --- a/apps/remix-ide/test-browser/helpers/init.js +++ b/apps/remix-ide/test-browser/helpers/init.js @@ -8,12 +8,11 @@ module.exports = function (browser, callback, url, preloadPlugins = true) { .injectScript('test-browser/helpers/applytestmode.js', function () { browser.fullscreenWindow(() => { if (preloadPlugins) { + console.log('preloadPlugins: ', preloadPlugins) initModules(browser, () => { browser.clickLaunchIcon('solidity') - .pause(2000) - .execute(() => { - document.getElementById('autoCompile').click() - }) + .waitForElementPresent('[for="autoCompile"]') + .click('[for="autoCompile"]') }) } }) diff --git a/package-lock.json b/package-lock.json index 0945b81ae8..bf78c589a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23087,7 +23087,8 @@ }, "dezalgo": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "requires": { "asap": "^2.0.0", "wrappy": "1" @@ -23639,7 +23640,8 @@ }, "normalize-git-url": { "version": "3.0.2", - "bundled": true + "resolved": false, + "integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q=" }, "normalize-package-data": { "version": "2.3.8", @@ -23672,7 +23674,8 @@ }, "npm-install-checks": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=", "requires": { "semver": "^2.3.0 || 3.x || 4 || 5" } @@ -23977,7 +23980,8 @@ }, "realize-package-specifier": { "version": "3.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-0N74gpUrjeP2frpekRmWYScfQfQ=", "requires": { "dezalgo": "^1.0.1", "npm-package-arg": "^4.1.1" @@ -24443,7 +24447,8 @@ "dependencies": { "unique-slug": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "requires": { "imurmurhash": "^0.1.4" }