From ff00618f214b5ecccd1757ac2b46ca75f2dc9152 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Sat, 16 Jan 2021 17:09:26 +0100 Subject: [PATCH] Fix failing firefox tests --- apps/remix-ide-e2e/src/commands/renamePath.ts | 2 +- apps/remix-ide-e2e/src/tests/fileExplorer.test.ts | 10 ++++++---- apps/remix-ide-e2e/src/tests/gist.test.ts | 5 +++-- apps/remix-ide-e2e/src/tests/terminal.test.ts | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/renamePath.ts b/apps/remix-ide-e2e/src/commands/renamePath.ts index fb1fdfeb05..552f159587 100644 --- a/apps/remix-ide-e2e/src/commands/renamePath.ts +++ b/apps/remix-ide-e2e/src/commands/renamePath.ts @@ -42,7 +42,7 @@ function renamePath (browser: NightwatchBrowser, path: string, newFileName: stri }) }) .pause(1000) - .keys(browser.Keys.ENTER) + .click('li[data-id="treeViewLitreeViewItembrowser/README.txt"]') // focus on root directory .pause(2000) .waitForElementNotPresent('[data-path="' + path + '"]') .waitForElementPresent('[data-path="' + renamedPath + '"]') diff --git a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts index b4255ab51e..b0bbb056d8 100644 --- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts @@ -22,8 +22,9 @@ module.exports = { .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') .click('*[data-id="fileExplorerNewFilecreateNewFile"]') .pause(1000) - .keys('5_New_contract.sol') - .keys(browser.Keys.ENTER) + .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/blank"]') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', '5_New_contract.sol') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', browser.Keys.ENTER) .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/5_New_contract.sol"]', 7000) }, @@ -50,8 +51,9 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/README.txt"]') .click('[data-id="fileExplorerNewFilecreateNewFolder"]') .pause(1000) - .keys('Browser_Tests') - .keys(browser.Keys.ENTER) + .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/blank"]') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', 'Browser_Tests') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', browser.Keys.ENTER) .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]') }, diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 2381f9c8d7..8f823954f4 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -29,8 +29,9 @@ module.exports = { .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .click('[data-id="fileExplorerNewFilecreateNewFolder"]') .pause(1000) - .keys('Browser_Tests') - .keys(browser.Keys.ENTER) + .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/blank"]') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', 'Browser_Tests') + .sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', browser.Keys.ENTER) .waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]') .addFile('File.sol', { content: '' }) .click('*[data-id="fileExplorerNewFilepublishToGist"]') diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 24cd600015..88c21e0055 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -35,6 +35,7 @@ module.exports = { 'Should execute remix.help() command': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="terminalCli"]') + .clearEditableContent('*[data-id="terminalCliInput"]') .executeScript('remix.help()') .journalChildIncludes('remix.loadgist(id)') .journalChildIncludes('remix.loadurl(url)')