Fix ballot tests timeout

pull/17/head
ioedeveloper 4 years ago committed by Aniket
parent ee82a8c9d4
commit 255b5b24d0
  1. 7
      apps/remix-ide/test-browser/commands/testFunction.js
  2. 7
      apps/remix-ide/test-browser/helpers/init.js
  3. 15
      package-lock.json

@ -5,9 +5,12 @@ class TestFunction extends EventEmitter {
command (txHash, expectedValue) { command (txHash, expectedValue) {
const browser = this.api const browser = this.api
const logs = {} 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}"]`) .click(`*[data-id="txLogger${txHash}"]`)
.waitForElementVisible(`*[data-id="txLoggerTable${txHash}"]`) .waitForElementVisible(`*[data-id="txLoggerTable${txHash}"]`)

@ -8,12 +8,11 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
.injectScript('test-browser/helpers/applytestmode.js', function () { .injectScript('test-browser/helpers/applytestmode.js', function () {
browser.fullscreenWindow(() => { browser.fullscreenWindow(() => {
if (preloadPlugins) { if (preloadPlugins) {
console.log('preloadPlugins: ', preloadPlugins)
initModules(browser, () => { initModules(browser, () => {
browser.clickLaunchIcon('solidity') browser.clickLaunchIcon('solidity')
.pause(2000) .waitForElementPresent('[for="autoCompile"]')
.execute(() => { .click('[for="autoCompile"]')
document.getElementById('autoCompile').click()
})
}) })
} }
}) })

15
package-lock.json generated

@ -23087,7 +23087,8 @@
}, },
"dezalgo": { "dezalgo": {
"version": "1.0.3", "version": "1.0.3",
"bundled": true, "resolved": false,
"integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=",
"requires": { "requires": {
"asap": "^2.0.0", "asap": "^2.0.0",
"wrappy": "1" "wrappy": "1"
@ -23639,7 +23640,8 @@
}, },
"normalize-git-url": { "normalize-git-url": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true "resolved": false,
"integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q="
}, },
"normalize-package-data": { "normalize-package-data": {
"version": "2.3.8", "version": "2.3.8",
@ -23672,7 +23674,8 @@
}, },
"npm-install-checks": { "npm-install-checks": {
"version": "3.0.0", "version": "3.0.0",
"bundled": true, "resolved": false,
"integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=",
"requires": { "requires": {
"semver": "^2.3.0 || 3.x || 4 || 5" "semver": "^2.3.0 || 3.x || 4 || 5"
} }
@ -23977,7 +23980,8 @@
}, },
"realize-package-specifier": { "realize-package-specifier": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "resolved": false,
"integrity": "sha1-0N74gpUrjeP2frpekRmWYScfQfQ=",
"requires": { "requires": {
"dezalgo": "^1.0.1", "dezalgo": "^1.0.1",
"npm-package-arg": "^4.1.1" "npm-package-arg": "^4.1.1"
@ -24443,7 +24447,8 @@
"dependencies": { "dependencies": {
"unique-slug": { "unique-slug": {
"version": "2.0.0", "version": "2.0.0",
"bundled": true, "resolved": false,
"integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=",
"requires": { "requires": {
"imurmurhash": "^0.1.4" "imurmurhash": "^0.1.4"
} }

Loading…
Cancel
Save