pull/2364/head
filip mertens 3 years ago
parent a836c7440a
commit 2ce7802757
  1. 8
      apps/remix-ide-e2e/src/commands/getBrowserLogs.ts
  2. 8
      apps/remix-ide-e2e/src/tests/importFromGithub.test.ts

@ -4,10 +4,12 @@ import EventEmitter from 'events'
class GetBrowserLogs extends EventEmitter { class GetBrowserLogs extends EventEmitter {
command(this: NightwatchBrowser): NightwatchBrowser { command(this: NightwatchBrowser): NightwatchBrowser {
this.api.getLog('browser', function (logs) { this.api.getLog('browser', function (logs) {
logs.forEach(function (log) { if (logs && Array.isArray(logs)) {
console.log(log) logs.forEach(function (log) {
console.log(log)
}
)
} }
)
}).perform(() => { }).perform(() => {
this.emit('complete') this.emit('complete')
}) })

@ -47,9 +47,9 @@ module.exports = {
browser browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]') .scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]')
.waitForElementVisible('*[data-id="homeTabModalDialogCustomPromptText"]') .waitForElementVisible('input[data-id="homeTabModalDialogCustomPromptText"]')
.click('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) .setValue('input[data-id="homeTabModalDialogCustomPromptText"]', testData.validURL)
.waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]')
.scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]') .scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]')
@ -63,9 +63,9 @@ module.exports = {
browser browser
.click('div[title="home"]') .click('div[title="home"]')
.scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]') .scrollAndClick('*[data-id="landingPageImportFromGitHubButton"]')
.waitForElementVisible('*[data-id="homeTabModalDialogCustomPromptText"]') .waitForElementVisible('input[data-id="homeTabModalDialogCustomPromptText"]')
.click('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) .setValue('input[data-id="homeTabModalDialogCustomPromptText"]', testData.JSON)
.waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]')
.scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]') .scrollAndClick('[data-id="homeTab-modal-footer-ok-react"]')

Loading…
Cancel
Save