auto_exec_v2
yann300 3 years ago
parent 2524904336
commit 48fa25b5fb
  1. 2
      apps/remix-ide-e2e/src/tests/plugin_api.ts
  2. 12
      apps/remix-ide-e2e/src/tests/terminal.test.ts

@ -358,7 +358,7 @@ module.exports = {
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonhardhat-provider"]')
.clickLaunchIcon('udapp')
.click('*[data-id="Hardhat Provider"]')
.modalFooterOKClick('hardhatprovider')
.modalFooterOKClick('hardhat-provider')
.waitForElementContainsText('*[data-id="settingsNetworkEnv"]', 'Custom') // e.g Custom (1337) network
.clickLaunchIcon('localPlugin')
.useXpath()

@ -196,7 +196,7 @@ module.exports = {
'Should run a script right after compilation #group5': function (browser: NightwatchBrowser) {
browser
.addFile('storage.sol', { content: scriptAutoExec.contract } )
.addFile('autoExec.js', { content: scriptAutoExec.script } )
.addFile('scripts/deploy_storage.js', { content: scriptAutoExec.script } )
.openFile('storage.sol')
.sendKeys('body', [browser.Keys.CONTROL, 'e'])
.journalChildIncludes('147', { shouldHaveOnlyOneOccurence: true })
@ -495,20 +495,21 @@ contract OwnerTest {
}`
const scriptAutoExec = {
contract: `
// SPDX-License-Identifier: GPL-3.0
contract: `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
library lib {
function test () public view returns (uint) {
return 147;
}
}
/**
* @title Storage
* @dev Store & retrieve value inr a variable
* @custom:dev-run-script ./scripts/deploy_storage.js
*/
contract Storage {
@ -533,7 +534,8 @@ contract Storage {
function getFromLib() public view returns (uint) {
return lib.test();
}
}`,
}
`,
script: `
// Right click on the script name and hit "Run" to execute
const { expect } = require("chai");

Loading…
Cancel
Save