diff --git a/apps/remix-ide-e2e/src/buildGroupTests.js b/apps/remix-ide-e2e/src/buildGroupTests.js index 0c589bd5fd..7127462125 100644 --- a/apps/remix-ide-e2e/src/buildGroupTests.js +++ b/apps/remix-ide-e2e/src/buildGroupTests.js @@ -47,7 +47,6 @@ function createFlakyTestFiles(file, text) { lines.forEach((line, index) => { // if line contains #flaky if (line.includes('#flaky')) { - console.log(line) const matches = line.match(/group\d+/g) const unique = matches.filter(onlyUnique) createFiles(file, matches, true) diff --git a/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts b/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts new file mode 100644 index 0000000000..d2e07cb7a4 --- /dev/null +++ b/apps/remix-ide-e2e/src/commands/getBrowserLogs.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 \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/types/index.d.ts b/apps/remix-ide-e2e/src/types/index.d.ts index 9abe5c2174..e8698d4407 100644 --- a/apps/remix-ide-e2e/src/types/index.d.ts +++ b/apps/remix-ide-e2e/src/types/index.d.ts @@ -61,6 +61,7 @@ declare module 'nightwatch' { acceptAndRemember (this: NightwatchBrowser, remember: boolean, accept: boolean): NightwatchBrowser clearConsole (this: NightwatchBrowser): NightwatchBrowser clearTransactions (this: NightwatchBrowser): NightwatchBrowser + getBrowserLogs (this: NightwatchBrowser): NightwatchBrowser currentSelectedFileIs (name: string): NightwatchBrowser }