add e2e for calls

pull/5370/head
yann300 2 years ago
parent c5a782f035
commit 4c49207f7d
  1. 11
      apps/remix-ide-e2e/src/tests/url.test.ts
  2. 4
      apps/remix-ide/src/app.js

@ -246,6 +246,15 @@ module.exports = {
.openFile('contracts')
.openFile('contracts/governance')
.openFile('contracts/governance/UnionGovernor.sol')
.end()
},
'Should execute function call from URL parameters #group2': function (browser: NightwatchBrowser) {
browser
.switchWorkspace('default_workspace')
.url('http://127.0.0.1:8080?calls=fileManager//open//contracts/3_Ballot.sol///terminal//log//log')
.refresh()
.waitForElementVisible('*[data-shared="tooltipPopup"]')
.waitForElementContainsText('*[data-shared="tooltipPopup"]', 'initiating fileManager and calling "open" ...')
.waitForElementContainsText('*[data-shared="tooltipPopup"]', 'initiating terminal and calling "log" ...')
}
}

@ -410,7 +410,7 @@ class AppComponent {
if (params.call) {
const callDetails = params.call.split('//')
if (callDetails.length > 1) {
this.appManager.call('notification', 'toast', `initiating ${callDetails[0]} ...`)
this.appManager.call('notification', 'toast', `initiating ${callDetails[0]} and calling "${callDetails[1]}" ...`)
// @todo(remove the timeout when activatePlugin is on 0.3.0)
this.appManager.call(...callDetails).catch(console.error)
}
@ -426,7 +426,7 @@ class AppComponent {
this.appManager.call(
"notification",
"toast",
`initiating ${callDetails[0]} ...`
`initiating ${callDetails[0]} and calling "${callDetails[1]}" ...`
);
// @todo(remove the timeout when activatePlugin is on 0.3.0)

Loading…
Cancel
Save