|
|
@ -52,21 +52,15 @@ 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) |
|
|
|
|
|
|
|
|
|
|
|
return browserName === 'chrome' ? browser |
|
|
|
|
|
|
|
.waitForElementVisible('#icon-panel', 2000) |
|
|
|
|
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.clickLaunchIcon('fileExplorers') |
|
|
|
.addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol']) |
|
|
|
.addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol']) |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.clickLaunchIcon('solidity') |
|
|
@ -75,7 +69,6 @@ module.exports = { |
|
|
|
.clickLaunchIcon('pluginManager') |
|
|
|
.clickLaunchIcon('pluginManager') |
|
|
|
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') |
|
|
|
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') |
|
|
|
.end() |
|
|
|
.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 |
|
|
|