Debug remixd tests

pull/1/head
ioedeveloper 5 years ago
parent 1d0e1015a4
commit aa754529ae
  1. 38
      test-browser/tests/remixd.js

@ -52,30 +52,23 @@ module.exports = {
when a relative import is used (i.e import "openzeppelin-solidity/contracts/math/SafeMath.sol") when a relative import is used (i.e import "openzeppelin-solidity/contracts/math/SafeMath.sol")
remix (as well as truffle) try to resolve it against the node_modules and installed_contracts folder. remix (as well as truffle) try to resolve it against the node_modules and installed_contracts folder.
*/ */
const browserName = browser.options.desiredCapabilities.browserName
return browserName === 'chrome' ? browser browser.waitForElementVisible('#icon-panel', 2000)
.waitForElementVisible('#icon-panel', 2000) .clickLaunchIcon('fileExplorers')
.clickLaunchIcon('fileExplorers') .addFile('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol'])
.addFile('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol']) .clickLaunchIcon('solidity')
.clickLaunchIcon('solidity') .testContracts('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol'], ['SafeMath'])
.testContracts('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol'], ['SafeMath'])
: ''
}, },
'Import from node_modules and reference a github import': function (browser) { 'Import from node_modules and reference a github import': function (browser) {
const browserName = browser.options.desiredCapabilities.browserName browser.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('fileExplorers')
return browserName === 'chrome' ? browser .addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol'])
.waitForElementVisible('#icon-panel', 2000) .clickLaunchIcon('solidity')
.clickLaunchIcon('fileExplorers') .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0
.addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol']) .testContracts('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol'], ['ERC20', 'test11'])
.clickLaunchIcon('solidity') .clickLaunchIcon('pluginManager')
.setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button')
.testContracts('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol'], ['ERC20', 'test11']) .end()
.clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button')
.end()
: ''
}, },
tearDown: sauce tearDown: sauce
} }
@ -87,9 +80,8 @@ function runTests (browser, testData) {
browser.end() browser.end()
return return
} }
if (browserName === 'firefox') { if (browserName === 'firefox' || browserName === 'chrome') {
console.log('do not run remixd test for ' + browserName + ': TODO to reenable later') console.log('do not run remixd test for ' + browserName + ': TODO to reenable later')
browser.end()
return return
} }
browser browser

Loading…
Cancel
Save