fix e2e tests, targeting the modal actions

pull/5370/head
yann300 4 years ago
parent c9f8962a82
commit 748d8b3e58
  1. 2
      apps/remix-ide-e2e/src/commands/removeFile.ts
  2. 9
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  3. 4
      apps/remix-ide-e2e/src/tests/gist.test.ts

@ -39,7 +39,7 @@ function removeFile (browser: NightwatchBrowser, path: string, done: VoidFunctio
.pause(2000)
.perform(() => {
console.log(path, 'to remove')
browser.waitForElementVisible('.modal-ok')
browser.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.click('.modal-ok')
.waitForElementNotPresent('[data-path="' + path + '"]')
done()

@ -43,8 +43,7 @@ module.exports = {
.rightClick('[data-path="5_Renamed_Contract.sol"]')
.click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"')
},
@ -75,7 +74,7 @@ module.exports = {
.click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]')
},
@ -88,11 +87,11 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000)
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000)
.perform((done) => {
if (runtimeBrowser === 'chrome') {

@ -38,7 +38,7 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
.pause(2000)
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(10000)
.getText('[data-id="default_workspaceModalDialogModalBody-react"]', (result) => {
console.log(result)
@ -99,7 +99,7 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(10000)
.getText('[data-id="default_workspaceModalDialogModalBody-react"]', (result) => {
browser.assert.ok(result.value === 'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.', 'Assert failed. Gist token error message not displayed.')

Loading…
Cancel
Save