diff --git a/src/app/editor/example-contracts.js b/src/app/editor/example-contracts.js index a01dead068..6f1099c2bb 100644 --- a/src/app/editor/example-contracts.js +++ b/src/app/editor/example-contracts.js @@ -1,15 +1,5 @@ 'use strict' -const basic = `pragma solidity >=0.2.0 <0.7.0; - -/** - * @title Basic contract - */ -contract Basic { - uint someVar; - constructor() public {} -}` - const storage = `pragma solidity >=0.4.22 <0.7.0; /** @@ -255,6 +245,5 @@ module.exports = { storage: { name: '1_Storage.sol', content: storage }, owner: { name: '2_Owner.sol', content: owner }, ballot: { name: '3_Ballot.sol', content: ballot }, - ballot_test: { name: 'tests/4_Ballot_test.sol', content: ballotTest }, - basic: { name: 'basic.sol', content: basic } + ballot_test: { name: 'tests/4_Ballot_test.sol', content: ballotTest } } diff --git a/test-browser/tests/fileManager_api.test.js b/test-browser/tests/fileManager_api.test.js index 884d432ed4..d290142188 100644 --- a/test-browser/tests/fileManager_api.test.js +++ b/test-browser/tests/fileManager_api.test.js @@ -54,7 +54,7 @@ module.exports = { .addFile('copyFile.js', { content: executeCopyFile }) .executeScript(`remix.exeCurrent()`) .pause(2000) - .journalLastChildIncludes('pragma solidity >=0.2.0 <0.7.0;') + .journalLastChildIncludes('pragma solidity >=0.4.22 <0.7.0;') }, 'Should execute `rename` api from file manager external api': function (browser) { @@ -146,7 +146,7 @@ const executeReadFile = ` const executeCopyFile = ` const run = async () => { - await remix.call('fileManager', 'copyFile', 'browser/basic.sol', 'browser/new_contract.sol') + await remix.call('fileManager', 'copyFile', 'browser/3_Ballot.sol', 'browser/new_contract.sol') const result = await remix.call('fileManager', 'readFile', 'browser/new_contract.sol') console.log(result) diff --git a/test-browser/tests/usingWebWorker.test.js b/test-browser/tests/usingWebWorker.test.js index daf12b422a..ba7b10c6ab 100644 --- a/test-browser/tests/usingWebWorker.test.js +++ b/test-browser/tests/usingWebWorker.test.js @@ -1,10 +1,19 @@ 'use strict' -var examples = require('../../src/app/editor/example-contracts') var init = require('../helpers/init') var sauce = require('./sauce') var sources = [ - {'browser/basic.sol': {content: examples.basic.content}} + {'browser/basic.sol': { content: + `pragma solidity >=0.2.0 <0.7.0; + + /** + * @title Basic contract + */ + contract Basic { + uint someVar; + constructor() public {} + }` + }} ] module.exports = { @@ -18,7 +27,7 @@ module.exports = { browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .clickLaunchIcon('fileExplorers') - .openFile('browser/basic.sol') + .addFile('browser/basic.sol', sources[0]['browser/basic.sol']) .clickLaunchIcon('solidity') .execute(() => { document.getElementById('nightlies').checked = true