diff --git a/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts b/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts index d2e07cb7a4..d1da53488a 100644 --- a/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts +++ b/apps/remix-ide-e2e/src/commands/getBrowserLogs.ts @@ -4,10 +4,12 @@ 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) + if (logs && Array.isArray(logs)) { + logs.forEach(function (log) { + console.log(log) + } + ) } - ) }).perform(() => { this.emit('complete') }) diff --git a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts index 34c4b9cd51..4bacebb4cd 100644 --- a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts +++ b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts @@ -47,9 +47,9 @@ module.exports = { browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]') - .waitForElementVisible('*[data-id="homeTabModalDialogCustomPromptText"]') + .waitForElementVisible('input[data-id="homeTabModalDialogCustomPromptText"]') .click('input[data-id="homeTabModalDialogCustomPromptText"]') - .clearValue('*[data-id="homeTabModalDialogCustomPromptText"]') + .clearValue('input[data-id="homeTabModalDialogCustomPromptText"]') .setValue('input[data-id="homeTabModalDialogCustomPromptText"]', testData.validURL) .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]') @@ -63,9 +63,9 @@ module.exports = { browser .click('div[title="home"]') .scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]') - .waitForElementVisible('*[data-id="homeTabModalDialogCustomPromptText"]') + .waitForElementVisible('input[data-id="homeTabModalDialogCustomPromptText"]') .click('input[data-id="homeTabModalDialogCustomPromptText"]') - .clearValue('*[data-id="homeTabModalDialogCustomPromptText"]') + .clearValue('input[data-id="homeTabModalDialogCustomPromptText"]') .setValue('input[data-id="homeTabModalDialogCustomPromptText"]', testData.JSON) .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]')