updated terminal.test.ts and remix-ui-test.tsx

pull/5370/head
davidzagi93@gmail.com 3 years ago
parent 6c70c02f86
commit fb09d919eb
  1. 20
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  2. 10
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -30,16 +30,16 @@ module.exports = {
.assert.visible('*[data-id="autoCompletePopUpAutoCompleteItem"]')
},
'Should execute remix.help() command': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="terminalCli"]')
.executeScript('remix.help()')
.waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadgist(id)', 60000)
.waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadurl(url)', 60000)
.waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.execute(filepath)', 60000)
.waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.exeCurrent()', 60000)
.waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.help()', 60000)
},
// 'Should execute remix.help() command': function (browser: NightwatchBrowser) {
// browser
// .waitForElementVisible('*[data-id="terminalCli"]')
// // .executeScript('remix.help()')
// .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadgist(id)', 60000)
// .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadurl(url)', 60000)
// .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.execute(filepath)', 60000)
// .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.exeCurrent()', 60000)
// // .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.help()', 60000)
// },
'Async/Await Script': function (browser: NightwatchBrowser) {
browser

@ -925,10 +925,16 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
return (<div className='px-4 block' data-id={`block_tx${trans.tx.hash}`} key={index}> { trans.tx.isCall ? renderCall(trans.tx, trans.resolvedData, trans.logs, index) : renderKnownTransactions(trans.tx, trans.receipt, trans.resolvedData, trans.logs, index)} </div>)
})
} else {
return x.message.map((x, i) => {
return x.message.map((msg, i) => {
if (typeof msg === 'object') {
return (
<div className="px-4 block" data-id="block_null" key={i}>{ x }</div>
<div className="px-4 block" data-id="block_null" key={i}><span className={x.style}>{ JSON.stringify(msg) } </span></div>
)
} else {
return (
<div className="px-4 block" data-id="block_null" key={i}>{ msg }</div>
)
}
})
}
})}

Loading…
Cancel
Save