From fff5b6d938c2530c5ad78372fde35ca04e808503 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 27 Feb 2019 14:45:39 +0100 Subject: [PATCH] fix browser test && add displayName to profile --- src/app/panels/file-panel.js | 3 ++- test-browser/tests/ballot.js | 6 +++--- test-browser/tests/compiling.js | 6 +++--- test-browser/tests/sharedFolderExplorer.js | 4 ++-- test-browser/tests/simpleContract.js | 2 +- test-browser/tests/staticanalysis.js | 2 +- test-browser/tests/units/testRecorder.js | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index bf69ecddd9..e26e815e5f 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -169,7 +169,8 @@ function filepanel (localRegistry) { self.profile = function () { return { - name: 'file explorers', + name: 'fileExplorers', + displayName: 'file explorers', methods: [], events: [], icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhxNjgtNDAgMTI4LTQwaDQxNnptLTU0NCAyMTNsLTI5OSAyOTloMjk5di0yOTl6bS02NDAtMzg0bC0yOTkgMjk5aDI5OXYtMjk5em0xOTYgNjQ3bDMxNi0zMTZ2LTQxNmgtMzg0djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djY0MGg1MTJ2LTI1NnEwLTQwIDIwLTg4dDQ4LTc2em05NTYgODA0di0xMTUyaC0zODR2NDE2cTAgNDAtMjggNjh0LTY4IDI4aC00MTZ2NjQwaDg5NnoiLz48L3N2Zz4=', diff --git a/test-browser/tests/ballot.js b/test-browser/tests/ballot.js index 2861632bc0..fe4fb245be 100644 --- a/test-browser/tests/ballot.js +++ b/test-browser/tests/ballot.js @@ -34,7 +34,7 @@ function runTests (browser, testData) { contractHelper.testContracts(browser, 'Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot'], function () { done() }) - }).clickLaunchIcon('run transactions') + }).clickLaunchIcon('run') .setValue('input[placeholder="uint8 _numProposals"]', '1') .click('#runTabView button[class^="instanceButton"]') .waitForElementPresent('.instance:nth-of-type(2)') @@ -65,7 +65,7 @@ function runTests (browser, testData) { done() }) }) - .clickLaunchIcon('run transactions') + .clickLaunchIcon('run') .click('div[class^="udappClose"]') .perform((client, done) => { console.log('ballot.abi') @@ -79,7 +79,7 @@ function runTests (browser, testData) { done() }) }) - .clickLaunchIcon('file explorers') + .clickLaunchIcon('fileExplorers') .perform((client, done) => { console.log('addInstance 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A') contractHelper.addInstance(browser, '0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true, () => { diff --git a/test-browser/tests/compiling.js b/test-browser/tests/compiling.js index fc82913722..7817299af6 100644 --- a/test-browser/tests/compiling.js +++ b/test-browser/tests/compiling.js @@ -38,7 +38,7 @@ function runTests (browser) { function testSimpleContract (browser, callback) { contractHelper.testContracts(browser, 'Untitled.sol', sources[0]['browser/Untitled.sol'], ['TestContract'], function () { - browser.clickLaunchIcon('run transactions') + browser.clickLaunchIcon('run') .click('#runTabView button[class^="instanceButton"]') .waitForElementPresent('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2)') @@ -69,7 +69,7 @@ function testSimpleContract (browser, callback) { function testReturnValues (browser, callback) { contractHelper.testContracts(browser, 'returnValues.sol', sources[1]['browser/returnValues.sol'], ['testReturnValues'], function () { - browser.clickLaunchIcon('run transactions') + browser.clickLaunchIcon('run') .click('#runTabView button[class^="instanceButton"]') .waitForElementPresent('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2)') @@ -107,7 +107,7 @@ function testReturnValues (browser, callback) { function testInputValues (browser, callback) { contractHelper.testContracts(browser, 'inputValues.sol', sources[2]['browser/inputValues.sol'], ['test'], function () { - browser.clickLaunchIcon('run transactions') + browser.clickLaunchIcon('run') .click('#runTabView button[class^="instanceButton"]') .waitForElementPresent('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2)') diff --git a/test-browser/tests/sharedFolderExplorer.js b/test-browser/tests/sharedFolderExplorer.js index 23ff14a47d..eb822f04e2 100644 --- a/test-browser/tests/sharedFolderExplorer.js +++ b/test-browser/tests/sharedFolderExplorer.js @@ -71,7 +71,7 @@ function runTests (browser, testData) { } browser .waitForElementVisible('#icon-panel', 10000) - .clickLaunchIcon('file explorers') + .clickLaunchIcon('fileExplorers') .click('.websocketconn') .waitForElementVisible('#modal-footer-ok', 10000) .click('#modal-footer-ok') @@ -132,7 +132,7 @@ function runTests (browser, testData) { testImportFromRemixd(browser, () => { done() }) }) .perform(function () { - browser.clickLaunchIcon('file explorers').click('[data-path="localhost"]') // collapse and expand + browser.clickLaunchIcon('fileExplorers').click('[data-path="localhost"]') // collapse and expand .waitForElementNotVisible('[data-path="localhost/folder1"]') .click('[data-path="localhost"]') .waitForElementVisible('[data-path="localhost/folder1"]') diff --git a/test-browser/tests/simpleContract.js b/test-browser/tests/simpleContract.js index 6165039b1f..b82c737c82 100644 --- a/test-browser/tests/simpleContract.js +++ b/test-browser/tests/simpleContract.js @@ -24,7 +24,7 @@ function runTests (browser) { browser .waitForElementVisible('#icon-panel', 10000) .clickLaunchIcon('solidity') - .clickLaunchIcon('file explorers') + .clickLaunchIcon('fileExplorers') .click('#swap-panel label[data-path="browser"]') .perform(() => { // the first fn is used to pass browser to the other ones. diff --git a/test-browser/tests/staticanalysis.js b/test-browser/tests/staticanalysis.js index accb26ffcc..f0af4d2129 100644 --- a/test-browser/tests/staticanalysis.js +++ b/test-browser/tests/staticanalysis.js @@ -40,7 +40,7 @@ function runTests (browser) { .clickLaunchIcon('solidity') contractHelper.testContracts(browser, 'Untitled.sol', sources[0]['browser/Untitled.sol'], ['TooMuchGas', 'test1', 'test2'], function () { browser - .clickLaunchIcon('solidity static analysis') + .clickLaunchIcon('solidityStaticAnalysis') .click('#staticanalysisView button') .waitForElementPresent('#staticanalysisresult .staticAnalysisWarning', 2000, true, function () { dom.listSelectorContains(['browser/Untitled.sol:2:33:Use of tx.origin', diff --git a/test-browser/tests/units/testRecorder.js b/test-browser/tests/units/testRecorder.js index 745daa98c2..5f5f5f201d 100644 --- a/test-browser/tests/units/testRecorder.js +++ b/test-browser/tests/units/testRecorder.js @@ -10,7 +10,7 @@ module.exports = { browser.clickLaunchIcon = contractHelper.clickLaunchIcon contractHelper.addFile(browser, 'scenario.json', {content: records}, () => { browser - .clickLaunchIcon('run transactions') + .clickLaunchIcon('run') .click('div[class^="cardContainer"] i[class^="arrow"]') .click('#runTabView .runtransaction') .waitForElementPresent('.instance:nth-of-type(2)')