pull/2361/head
filip mertens 3 years ago
parent 365c5dc6c0
commit 59483716e7
  1. 17
      apps/remix-ide-e2e/src/commands/getBrowserLogs.ts
  2. 1
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  3. 1
      apps/remix-ide-e2e/src/types/index.d.ts

@ -0,0 +1,17 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class GetBrowserLogs extends EventEmitter {
command(this: NightwatchBrowser): NightwatchBrowser {
this.api.getLog('browser', function (logs) {
logs.forEach(function (log) {
console.log(log)
}
)
}).perform(() => {
this.emit('complete')
})
return this
}
}
module.exports = GetBrowserLogs

@ -201,6 +201,7 @@ module.exports = {
.openFile('contracts/storage.sol') .openFile('contracts/storage.sol')
.sendKeys('body', [browser.Keys.CONTROL, browser.Keys.SHIFT, 's']) .sendKeys('body', [browser.Keys.CONTROL, browser.Keys.SHIFT, 's'])
.pause(5000) .pause(5000)
.getBrowserLogs()
.journalLastChildIncludes('147') .journalLastChildIncludes('147')
} }
} }

@ -61,6 +61,7 @@ declare module 'nightwatch' {
acceptAndRemember (this: NightwatchBrowser, remember: boolean, accept: boolean): NightwatchBrowser acceptAndRemember (this: NightwatchBrowser, remember: boolean, accept: boolean): NightwatchBrowser
clearConsole (this: NightwatchBrowser): NightwatchBrowser clearConsole (this: NightwatchBrowser): NightwatchBrowser
clearTransactions (this: NightwatchBrowser): NightwatchBrowser clearTransactions (this: NightwatchBrowser): NightwatchBrowser
getBrowserLogs (this: NightwatchBrowser): NightwatchBrowser
currentSelectedFileIs (name: string): NightwatchBrowser currentSelectedFileIs (name: string): NightwatchBrowser
} }

Loading…
Cancel
Save