Commit 9cfccd63 authored by Grandschtroumpf's avatar Grandschtroumpf Committed by François

Udapp as a LibrayPlugin in RunTab.

parent f5d42bb7
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
"onchange": "^3.2.1", "onchange": "^3.2.1",
"remix-analyzer": "0.3.8", "remix-analyzer": "0.3.8",
"remix-debug": "0.3.9", "remix-debug": "0.3.9",
"remix-lib": "0.4.7", "remix-lib": "^0.4.8",
"remix-solidity": "0.3.10", "remix-solidity": "0.3.10",
"remix-tabs": "1.0.48", "remix-tabs": "1.0.48",
"remix-tests": "0.1.13", "remix-tests": "0.1.13",
...@@ -61,7 +61,6 @@ ...@@ -61,7 +61,6 @@
"selenium-standalone": "^6.0.1", "selenium-standalone": "^6.0.1",
"semver": "^6.1.2", "semver": "^6.1.2",
"solc": "^0.5.0", "solc": "^0.5.0",
"standard": "^8.5.0",
"swarmgw": "^0.3.1", "swarmgw": "^0.3.1",
"tape": "^4.5.1", "tape": "^4.5.1",
"uglify-js": "^2.8.16", "uglify-js": "^2.8.16",
...@@ -73,9 +72,10 @@ ...@@ -73,9 +72,10 @@
"yo-yoify": "^3.7.3" "yo-yoify": "^3.7.3"
}, },
"dependencies": { "dependencies": {
"@remixproject/engine": "^0.1.5",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"@remixproject/engine": "^0.1.2-7", "remixd": "0.1.8-alpha.6",
"remixd": "0.1.8-alpha.6" "standard": "^8.5.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -11,7 +11,6 @@ var loadFileFromParent = require('./loadFilesFromParent') ...@@ -11,7 +11,6 @@ var loadFileFromParent = require('./loadFilesFromParent')
var { OffsetToLineColumnConverter } = require('./lib/offsetToLineColumnConverter') var { OffsetToLineColumnConverter } = require('./lib/offsetToLineColumnConverter')
var QueryParams = require('./lib/query-params') var QueryParams = require('./lib/query-params')
var GistHandler = require('./lib/gist-handler') var GistHandler = require('./lib/gist-handler')
var makeUdapp = require('./makeUdapp')
var Storage = remixLib.Storage var Storage = remixLib.Storage
var Browserfiles = require('./app/files/browser-files') var Browserfiles = require('./app/files/browser-files')
var SharedFolder = require('./app/files/shared-folder') var SharedFolder = require('./app/files/shared-folder')
...@@ -34,10 +33,11 @@ const SettingsTab = require('./app/tabs/settings-tab') ...@@ -34,10 +33,11 @@ const SettingsTab = require('./app/tabs/settings-tab')
const AnalysisTab = require('./app/tabs/analysis-tab') const AnalysisTab = require('./app/tabs/analysis-tab')
const DebuggerTab = require('./app/tabs/debugger-tab') const DebuggerTab = require('./app/tabs/debugger-tab')
const TestTab = require('./app/tabs/test-tab') const TestTab = require('./app/tabs/test-tab')
const RunTab = require('./app/tabs/run-tab')
const FilePanel = require('./app/panels/file-panel') const FilePanel = require('./app/panels/file-panel')
const Editor = require('./app/editor/editor') const Editor = require('./app/editor/editor')
import { RunTab, makeUdapp } from './app/udapp';
import PanelsResize from './lib/panels-resize' import PanelsResize from './lib/panels-resize'
import { RemixAppManager } from './remixAppManager' import { RemixAppManager } from './remixAppManager'
import { FramingService } from './framingService' import { FramingService } from './framingService'
...@@ -49,6 +49,7 @@ import { HiddenPanel } from './app/components/hidden-panel' ...@@ -49,6 +49,7 @@ import { HiddenPanel } from './app/components/hidden-panel'
import { VerticalIcons } from './app/components/vertical-icons' import { VerticalIcons } from './app/components/vertical-icons'
import { LandingPage } from './app/ui/landing-page/landing-page' import { LandingPage } from './app/ui/landing-page/landing-page'
import { MainPanel } from './app/components/main-panel' import { MainPanel } from './app/components/main-panel'
import { UniversalDApp } from 'remix-lib'
var css = csjs` var css = csjs`
html { box-sizing: border-box; } html { box-sizing: border-box; }
...@@ -244,7 +245,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -244,7 +245,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const compilersArtefacts = new CompilersArtefacts() // store all the compilation results (key represent a compiler name) const compilersArtefacts = new CompilersArtefacts() // store all the compilation results (key represent a compiler name)
registry.put({api: compilersArtefacts, name: 'compilersartefacts'}) registry.put({api: compilersArtefacts, name: 'compilersartefacts'})
// ----------------- universal dapp: run transaction, listen on transactions, decode events // ----------------- universal dapp: run transaction, listen on transactions, decode events
const {udapp, eventsDecoder, txlistener} = makeUdapp(compilersArtefacts, (domEl) => mainview.getTerminal().logHtml(domEl)) const udapp = new UniversalDApp(registry.get('config').api)
const {eventsDecoder, txlistener} = makeUdapp(udapp, compilersArtefacts, (domEl) => mainview.getTerminal().logHtml(domEl))
// ----------------- network service (resolve network id / name) ---------------------------- // ----------------- network service (resolve network id / name) ----------------------------
const networkModule = new NetworkModule() const networkModule = new NetworkModule()
// ----------------- convert offset to line/column service ---------------------------- // ----------------- convert offset to line/column service ----------------------------
...@@ -258,7 +260,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -258,7 +260,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
fileManager, fileManager,
compilerMetadataGenerator, compilerMetadataGenerator,
compilersArtefacts, compilersArtefacts,
udapp,
networkModule, networkModule,
offsetToLineColumnConverter offsetToLineColumnConverter
]) ])
...@@ -301,7 +302,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -301,7 +302,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
]) ])
// CONTENT VIEWS & DEFAULT PLUGINS // CONTENT VIEWS & DEFAULT PLUGINS
let compileTab = new CompileTab( const compileTab = new CompileTab(
editor, editor,
registry.get('config').api, registry.get('config').api,
new Renderer(), new Renderer(),
...@@ -309,7 +310,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -309,7 +310,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
registry.get('filemanager').api, registry.get('filemanager').api,
registry.get('fileproviders').api, registry.get('fileproviders').api,
) )
let run = new RunTab( const run = new RunTab(
udapp, udapp,
registry.get('config').api, registry.get('config').api,
registry.get('filemanager').api, registry.get('filemanager').api,
...@@ -319,9 +320,9 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -319,9 +320,9 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
networkModule, networkModule,
mainview mainview
) )
let analysis = new AnalysisTab(registry) const analysis = new AnalysisTab(registry)
let debug = new DebuggerTab() const debug = new DebuggerTab()
let test = new TestTab( const test = new TestTab(
registry.get('filemanager').api, registry.get('filemanager').api,
filePanel, filePanel,
compileTab, compileTab,
...@@ -338,7 +339,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -338,7 +339,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...appManager.registeredPlugins() ...appManager.registeredPlugins()
]) ])
await appManager.activate(['contentImport', 'theme', 'sourceHighlighters', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'udapp', 'network', 'offsetToLineColumnConverter']) await appManager.activate(['contentImport', 'theme', 'sourceHighlighters', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'offsetToLineColumnConverter'])
await appManager.activate(['mainPanel']) await appManager.activate(['mainPanel'])
await appManager.activate(['menuicons', 'home', 'sidePanel', 'pluginManager', 'fileExplorers', 'settings']) await appManager.activate(['menuicons', 'home', 'sidePanel', 'pluginManager', 'fileExplorers', 'settings'])
......
...@@ -44,7 +44,6 @@ export class AbstractPanel extends HostPlugin { ...@@ -44,7 +44,6 @@ export class AbstractPanel extends HostPlugin {
* @param {HTMLElement} content the HTMLContent of the plugin * @param {HTMLElement} content the HTMLContent of the plugin
*/ */
add (view, name) { add (view, name) {
console.log('panel', name, view)
if (this.contents[name]) throw new Error(`Plugin ${name} already rendered`) if (this.contents[name]) throw new Error(`Plugin ${name} already rendered`)
view.style.height = '100%' view.style.height = '100%'
view.style.width = '100%' view.style.width = '100%'
......
...@@ -310,7 +310,7 @@ export class VerticalIcons extends Plugin { ...@@ -310,7 +310,7 @@ export class VerticalIcons extends Plugin {
</div> </div>
` `
this.iconKind['run'] = yo` this.iconKind['udapp'] = yo`
<div id='runIcons'> <div id='runIcons'>
</div> </div>
` `
...@@ -345,7 +345,7 @@ export class VerticalIcons extends Plugin { ...@@ -345,7 +345,7 @@ export class VerticalIcons extends Plugin {
${home} ${home}
${this.iconKind['fileexplorer']} ${this.iconKind['fileexplorer']}
${this.iconKind['compile']} ${this.iconKind['compile']}
${this.iconKind['run']} ${this.iconKind['udapp']}
${this.iconKind['testing']} ${this.iconKind['testing']}
${this.iconKind['analysis']} ${this.iconKind['analysis']}
${this.iconKind['debugging']} ${this.iconKind['debugging']}
......
...@@ -199,7 +199,11 @@ class Terminal extends Plugin { ...@@ -199,7 +199,11 @@ class Terminal extends Plugin {
</div> </div>
` `
setInterval(async () => { setInterval(async () => {
self._view.pendingTxCount.innerHTML = await self.call('udapp', 'pendingTransactionsCount') try {
self._view.pendingTxCount.innerHTML = await self.call('udapp', 'pendingTransactionsCount')
} catch {
console.log('Terminal try to call "udapp".')
}
}, 1000) }, 1000)
function listenOnNetwork (ev) { function listenOnNetwork (ev) {
......
...@@ -30,7 +30,7 @@ const profile = { ...@@ -30,7 +30,7 @@ const profile = {
location: 'sidePanel', location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html', documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html',
version: packageJson.version, version: packageJson.version,
methods: ['getCompilationResult'] methods: ['getCompilationResult', 'compile']
} }
......
export * from './run-tab'
export * from './make-udapp'
\ No newline at end of file
var UniversalDApp = require('./universal-dapp.js') var registry = require('../../global/registry')
var registry = require('./global/registry')
var remixLib = require('remix-lib') var remixLib = require('remix-lib')
var yo = require('yo-yo') var yo = require('yo-yo')
var executionContext = remixLib.execution.executionContext var executionContext = remixLib.execution.executionContext
var Txlistener = remixLib.execution.txListener var Txlistener = remixLib.execution.txListener
var EventsDecoder = remixLib.execution.EventsDecoder var EventsDecoder = remixLib.execution.EventsDecoder
var TransactionReceiptResolver = require('./lib/transactionReceiptResolver') var TransactionReceiptResolver = require('../../lib/transactionReceiptResolver')
module.exports = (compilersArtefacts, logHtmlCallback) => { export function makeUdapp(udapp, compilersArtefacts, logHtmlCallback) {
// ----------------- UniversalDApp ----------------- // ----------------- UniversalDApp -----------------
const udapp = new UniversalDApp(registry)
// TODO: to remove when possible // TODO: to remove when possible
udapp.event.register('transactionBroadcasted', (txhash, networkName) => { udapp.event.register('transactionBroadcasted', (txhash, networkName) => {
var txLink = executionContext.txDetailsLink(networkName, txhash) var txLink = executionContext.txDetailsLink(networkName, txhash)
......
var $ = require('jquery') import { LibraryPlugin } from '@remixproject/engine';
var yo = require('yo-yo') import * as packageJson from '../../../package.json'
var EventManager = require('../../lib/events')
var Card = require('../ui/card')
var css = require('./styles/run-tab-styles')
var Settings = require('./runTab/model/settings.js')
var SettingsUI = require('./runTab/settings.js')
var DropdownLogic = require('./runTab/model/dropdownlogic.js') const $ = require('jquery')
var ContractDropdownUI = require('./runTab/contractDropdown.js') const yo = require('yo-yo')
var UniversalDAppUI = require('../ui/universal-dapp-ui') const EventManager = require('../../lib/events')
const Card = require('../ui/card')
var Recorder = require('./runTab/model/recorder.js') const css = require('../tabs/styles/run-tab-styles')
var RecorderUI = require('./runTab/recorder.js') const Settings = require('../tabs/runTab/model/settings.js')
const SettingsUI = require('../tabs/runTab/settings.js')
const Recorder = require('../tabs/runTab/model/recorder.js')
const RecorderUI = require('../tabs/runTab/recorder.js')
const DropdownLogic = require('../tabs/runTab/model/dropdownlogic.js')
const ContractDropdownUI = require('../tabs/runTab/contractDropdown.js')
const UniversalDAppUI = require('../ui/universal-dapp-ui')
const executionContext = require('../../execution-context') const executionContext = require('../../execution-context')
import { ViewPlugin } from '@remixproject/engine'
import * as packageJson from '../../../package.json'
const profile = { const profile = {
name: 'run', name: 'udapp',
displayName: 'Deploy & run transactions', displayName: 'Deploy & run transactions',
methods: [],
events: [],
icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4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ZXJsaW1pdD0iMTAiIHBvaW50cz0iNDE3LjA4Myw0MDYuNTg5IDIwOS43OTEsNTE5LjQ5NCAxLjg0Niw0MDYuMjM0IDIwOS43OTEsNjc1Ljg2MyAJIi8+DQoJPHBvbHlnb24gc3Ryb2tlPSIjRkZGRkZGIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50cz0iNDE3LjA4MywzMTguNzA3IDIwOS43OTEsMC43MTEgMS44NDYsMzE4LjQyOCAyMDkuNzkxLDQzMS42ODkgCSIvPg0KPC9nPg0KPC9zdmc+DQo=',
description: 'execute and save transactions', description: 'execute and save transactions',
kind: 'run', kind: 'udapp',
location: 'sidePanel', location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/run.html', documentation: 'https://remix-ide.readthedocs.io/en/latest/run.html',
version: packageJson.version version: packageJson.version,
permission: true,
events: ['newTransaction'],
methods: ['createVMAccount', 'sendTransaction', 'getAccounts', 'pendingTransactionsCount']
} }
class RunTab extends ViewPlugin { export class RunTab extends LibraryPlugin {
constructor (udapp, config, fileManager, editor, filePanel, compilersArtefacts, networkModule, mainView) { constructor (udapp, config, fileManager, editor, filePanel, compilersArtefacts, networkModule, mainView) {
super(profile) super(udapp, profile)
this.event = new EventManager() this.event = new EventManager()
this.config = config this.config = config
this.udapp = udapp this.udapp = udapp
...@@ -55,11 +54,11 @@ class RunTab extends ViewPlugin { ...@@ -55,11 +54,11 @@ class RunTab extends ViewPlugin {
}, },
getValue: (cb) => { getValue: (cb) => {
try { try {
var number = document.querySelector('#value').value const number = document.querySelector('#value').value
var select = document.getElementById('unit') const select = document.getElementById('unit')
var index = select.selectedIndex const index = select.selectedIndex
var selectedUnit = select.querySelectorAll('option')[index].dataset.unit const selectedUnit = select.querySelectorAll('option')[index].dataset.unit
var unit = 'ether' // default let unit = 'ether' // default
if (['ether', 'finney', 'gwei', 'wei'].indexOf(selectedUnit) >= 0) { if (['ether', 'finney', 'gwei', 'wei'].indexOf(selectedUnit) >= 0) {
unit = selectedUnit unit = selectedUnit
} }
...@@ -126,11 +125,11 @@ class RunTab extends ViewPlugin { ...@@ -126,11 +125,11 @@ class RunTab extends ViewPlugin {
} }
renderDropdown (udappUI, fileManager, compilersArtefacts, config, editor, udapp, filePanel, logCallback) { renderDropdown (udappUI, fileManager, compilersArtefacts, config, editor, udapp, filePanel, logCallback) {
var dropdownLogic = new DropdownLogic(fileManager, compilersArtefacts, config, editor, udapp, filePanel, this) const dropdownLogic = new DropdownLogic(fileManager, compilersArtefacts, config, editor, udapp, filePanel, this)
this.contractDropdownUI = new ContractDropdownUI(dropdownLogic, logCallback) this.contractDropdownUI = new ContractDropdownUI(dropdownLogic, logCallback)
this.contractDropdownUI.event.register('clearInstance', () => { this.contractDropdownUI.event.register('clearInstance', () => {
var noInstancesText = this.noInstancesText const noInstancesText = this.noInstancesText
if (noInstancesText.parentNode) { noInstancesText.parentNode.removeChild(noInstancesText) } if (noInstancesText.parentNode) { noInstancesText.parentNode.removeChild(noInstancesText) }
}) })
this.contractDropdownUI.event.register('newContractABIAdded', (abi, address) => { this.contractDropdownUI.event.register('newContractABIAdded', (abi, address) => {
...@@ -144,7 +143,7 @@ class RunTab extends ViewPlugin { ...@@ -144,7 +143,7 @@ class RunTab extends ViewPlugin {
renderRecorder (udapp, udappUI, fileManager, config, logCallback) { renderRecorder (udapp, udappUI, fileManager, config, logCallback) {
this.recorderCount = yo`<span>0</span>` this.recorderCount = yo`<span>0</span>`
var recorder = new Recorder(udapp, fileManager, config) const recorder = new Recorder(udapp, fileManager, config)
recorder.event.register('recorderCountChange', (count) => { recorder.event.register('recorderCountChange', (count) => {
this.recorderCount.innerText = count this.recorderCount.innerText = count
}) })
...@@ -206,7 +205,4 @@ class RunTab extends ViewPlugin { ...@@ -206,7 +205,4 @@ class RunTab extends ViewPlugin {
this.renderRecorderCard() this.renderRecorderCard()
return this.renderContainer() return this.renderContainer()
} }
}
} \ No newline at end of file
module.exports = RunTab
...@@ -125,21 +125,21 @@ export class LandingPage extends ViewPlugin { ...@@ -125,21 +125,21 @@ export class LandingPage extends ViewPlugin {
let startSolidity = () => { let startSolidity = () => {
this.appManager.ensureActivated('solidity') this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('run') this.appManager.ensureActivated('udapp')
this.appManager.ensureActivated('solidityStaticAnalysis') this.appManager.ensureActivated('solidityStaticAnalysis')
this.appManager.ensureActivated('solidityUnitTesting') this.appManager.ensureActivated('solidityUnitTesting')
this.verticalIcons.select('solidity') this.verticalIcons.select('solidity')
} }
let startVyper = () => { let startVyper = () => {
this.appManager.ensureActivated('vyper') this.appManager.ensureActivated('vyper')
this.appManager.ensureActivated('run') this.appManager.ensureActivated('udapp')
this.verticalIcons.select('vyper') this.verticalIcons.select('vyper')
} }
let startPipeline = () => { let startPipeline = () => {
this.appManager.ensureActivated('solidity') this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('pipeline') this.appManager.ensureActivated('pipeline')
this.appManager.ensureActivated('run') this.appManager.ensureActivated('udapp')
} }
let startDebugger = () => { let startDebugger = () => {
this.appManager.ensureActivated('debugger') this.appManager.ensureActivated('debugger')
......
...@@ -16,7 +16,7 @@ export const defaultWorkspaces = (appManager) => { ...@@ -16,7 +16,7 @@ export const defaultWorkspaces = (appManager) => {
true, true,
() => { () => {
appManager.ensureActivated('solidity') appManager.ensureActivated('solidity')
appManager.ensureActivated('run') appManager.ensureActivated('udapp')
appManager.ensureActivated('solidityStaticAnalysis') appManager.ensureActivated('solidityStaticAnalysis')
appManager.ensureActivated('solidityUnitTesting') appManager.ensureActivated('solidityUnitTesting')
}, () => {}), }, () => {}),
...@@ -26,7 +26,7 @@ export const defaultWorkspaces = (appManager) => { ...@@ -26,7 +26,7 @@ export const defaultWorkspaces = (appManager) => {
true, true,
() => { () => {
appManager.ensureActivated('vyper') appManager.ensureActivated('vyper')
appManager.ensureActivated('run') appManager.ensureActivated('udapp')
}, () => {}), }, () => {}),
new Workspace('Debugger', 'Debug transactions with remix', false, () => { new Workspace('Debugger', 'Debug transactions with remix', false, () => {
appManager.ensureActivated('debugger') appManager.ensureActivated('debugger')
...@@ -34,7 +34,7 @@ export const defaultWorkspaces = (appManager) => { ...@@ -34,7 +34,7 @@ export const defaultWorkspaces = (appManager) => {
new Workspace('Pipeline', '', false, () => { new Workspace('Pipeline', '', false, () => {
appManager.ensureActivated('solidity') appManager.ensureActivated('solidity')
appManager.ensureActivated('pipeline') appManager.ensureActivated('pipeline')
appManager.ensureActivated('run') appManager.ensureActivated('udapp')
}) })
] ]
} }
This diff is collapsed.
This diff is collapsed.
...@@ -13,7 +13,7 @@ class addAtAddressInstance extends EventEmitter { ...@@ -13,7 +13,7 @@ class addAtAddressInstance extends EventEmitter {
} }
function addInstance (browser, address, isValidFormat, isValidChecksum, callback) { function addInstance (browser, address, isValidFormat, isValidChecksum, callback) {
browser.clickLaunchIcon('run').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () { browser.clickLaunchIcon('udapp').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () {
browser.click('button[id^="runAndDeployAtAdressButton"]') browser.click('button[id^="runAndDeployAtAdressButton"]')
.execute(function () { .execute(function () {
var ret = document.querySelector('div[class^="modal-body"] div').innerHTML var ret = document.querySelector('div[class^="modal-body"] div').innerHTML
......
...@@ -13,7 +13,7 @@ class AddFile extends EventEmitter { ...@@ -13,7 +13,7 @@ class AddFile extends EventEmitter {
} }
function addFile (browser, name, content, done) { function addFile (browser, name, content, done) {
browser.clickLaunchIcon('run').clickLaunchIcon('fileExplorers').click('.newFile') browser.clickLaunchIcon('udapp').clickLaunchIcon('fileExplorers').click('.newFile')
.perform((client, done) => { .perform((client, done) => {
browser.execute(function (fileName) { browser.execute(function (fileName) {
if (fileName !== 'Untitled.sol') { if (fileName !== 'Untitled.sol') {
......
...@@ -13,7 +13,7 @@ class CreateContract extends EventEmitter { ...@@ -13,7 +13,7 @@ class CreateContract extends EventEmitter {
} }
function createContract (browser, inputParams, callback) { function createContract (browser, inputParams, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('run') browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () { .setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () {
browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() }) browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() })
}) })
......
...@@ -13,7 +13,7 @@ class SelectContract extends EventEmitter { ...@@ -13,7 +13,7 @@ class SelectContract extends EventEmitter {
} }
function selectContract (browser, contractName, callback) { function selectContract (browser, contractName, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('run') browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => { .setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => {
callback() callback()
}) })
......
...@@ -19,7 +19,7 @@ module.exports = { ...@@ -19,7 +19,7 @@ module.exports = {
.waitForElementVisible('#icon-panel', 10000) .waitForElementVisible('#icon-panel', 10000)
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot'])
.clickLaunchIcon('run') .clickLaunchIcon('udapp')
.setValue('input[placeholder="uint8 _numProposals"]', '1') .setValue('input[placeholder="uint8 _numProposals"]', '1')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
...@@ -43,7 +43,7 @@ module.exports = { ...@@ -43,7 +43,7 @@ module.exports = {
}, },
'Access Ballot via at address': function (browser) { 'Access Ballot via at address': function (browser) {
browser.clickLaunchIcon('run') browser.clickLaunchIcon('udapp')
.click('button[class^="udappClose"]') .click('button[class^="udappClose"]')
.addFile('ballot.abi', { content: ballotABI }) .addFile('ballot.abi', { content: ballotABI })
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
......
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
'Test Recorder': function (browser) { 'Test Recorder': function (browser) {
var addressRef var addressRef
browser.addFile('scenario.json', {content: records}) browser.addFile('scenario.json', {content: records})
.clickLaunchIcon('run') .clickLaunchIcon('udapp')
.click('div[class^="cardContainer"] i[class^="arrow"]') .click('div[class^="cardContainer"] i[class^="arrow"]')
.click('#runTabView .runtransaction') .click('#runTabView .runtransaction')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
......
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
}, },
'Test Signature': function (browser) { 'Test Signature': function (browser) {
let hash, signature let hash, signature
browser.clickLaunchIcon('run').signMessage('test message', (h, s) => { browser.clickLaunchIcon('udapp').signMessage('test message', (h, s) => {
hash = h hash = h
signature = s signature = s
console.log('hash', hash) console.log('hash', hash)
......
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
'Execute Simple Contract and Test Terminal': function (browser) { 'Execute Simple Contract and Test Terminal': function (browser) {
browser.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TestContract']) browser.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TestContract'])
.clickLaunchIcon('run') .clickLaunchIcon('udapp')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button') .click('.instance:nth-of-type(2) > div > button')
...@@ -39,7 +39,7 @@ module.exports = { ...@@ -39,7 +39,7 @@ module.exports = {
'Test Complex Return Values': function (browser) { 'Test Complex Return Values': function (browser) {
browser.testContracts('returnValues.sol', sources[1]['browser/returnValues.sol'], ['testReturnValues']) browser.testContracts('returnValues.sol', sources[1]['browser/returnValues.sol'], ['testReturnValues'])
.clickLaunchIcon('run') .clickLaunchIcon('udapp')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button') .click('.instance:nth-of-type(2) > div > button')
...@@ -76,7 +76,7 @@ module.exports = { ...@@ -76,7 +76,7 @@ module.exports = {
'Test Complex Input Values': function (browser) { 'Test Complex Input Values': function (browser) {
browser.testContracts('inputValues.sol', sources[2]['browser/inputValues.sol'], ['test']) browser.testContracts('inputValues.sol', sources[2]['browser/inputValues.sol'], ['test'])
.clickLaunchIcon('run') .clickLaunchIcon('udapp')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button') .click('.instance:nth-of-type(2) > div > button')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment