diff --git a/apps/remix-ide-e2e/src/tests/solidityImport b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts similarity index 91% rename from apps/remix-ide-e2e/src/tests/solidityImport rename to apps/remix-ide-e2e/src/tests/solidityImport.spec.ts index ab4e4331b1..e95519898a 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport +++ b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts @@ -73,13 +73,10 @@ module.exports = { .addFile('Untitled8.sol', sources[7]['Untitled8.sol']) .clickLaunchIcon('fileExplorers') .clickLaunchIcon('solidity') - .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)', 45000) - .scrollAndClick('[data-id="compiledErrors"] div:nth-child(3)') // click on error which point to ERC20 code + .waitForElementVisible('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]', 120000) + .scrollAndClick('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]') // click on error which point to ERC20 code .pause(5000) - .getEditorValue((content) => { - browser.assert.ok(content.indexOf('contract ERC20 is Context, IERC20') !== -1, - 'current displayed content should be from the ERC20 source code') - }) + .waitForElementContainsText('#input', 'contract ERC20 is Context, IERC20', 60000) }, 'Test NPM Import (with unpkg.com)': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide/src/app/ui/renderer.js b/apps/remix-ide/src/app/ui/renderer.js index 21b98fbd85..35cf8395ec 100644 --- a/apps/remix-ide/src/app/ui/renderer.js +++ b/apps/remix-ide/src/app/ui/renderer.js @@ -131,7 +131,7 @@ Renderer.prototype.error = function (message, container, opt) { var $pre = $(opt.useSpan ? yo`` : yo`
`).html(message)
 
   const classList = opt.type === 'error' ? 'alert alert-danger' : 'alert alert-warning'
-  var $error = $(yo`
`).prepend($pre) + var $error = $(yo`
`).prepend($pre) $(container).append($error) $error.click((ev) => { diff --git a/package.json b/package.json index c2281340af..af5dab692f 100644 --- a/package.json +++ b/package.json @@ -60,11 +60,11 @@ "nightwatch_local_ballot_0_4_11": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.js --env=chrome", "nightwatch_local_usingWorker": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome", "nightwatch_local_libraryDeployment": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome", - "nightwatch_local_solidityImport": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport.test.js --env=chrome", + "nightwatch_local_solidityImport": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport.spec.js --env=chrome", "nightwatch_local_recorder": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/recorder.spec.js --env=chrome", "nightwatch_local_transactionExecution": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/transactionExecution.test.js --env=chrome", "nightwatch_local_staticAnalysis": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/staticAnalysis.test.js --env=chrome", - "nightwatch_local_signingMessage": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=firefox", + "nightwatch_local_signingMessage": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=chrome", "nightwatch_local_specialFunctions": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/specialFunctions.test.js --env=chrome", "nightwatch_local_solidityUnitTests": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityUnittests.test.js --env=chrome", "nightwatch_local_remixd": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/remixd.test.js --env=chrome",