Commit 8bb265fd authored by yann300's avatar yann300

fix e2e tests, targeting the modal actions

parent 2882391b
...@@ -39,7 +39,7 @@ function removeFile (browser: NightwatchBrowser, path: string, done: VoidFunctio ...@@ -39,7 +39,7 @@ function removeFile (browser: NightwatchBrowser, path: string, done: VoidFunctio
.pause(2000) .pause(2000)
.perform(() => { .perform(() => {
console.log(path, 'to remove') console.log(path, 'to remove')
browser.waitForElementVisible('.modal-ok') browser.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.click('.modal-ok') .click('.modal-ok')
.waitForElementNotPresent('[data-path="' + path + '"]') .waitForElementNotPresent('[data-path="' + path + '"]')
done() done()
......
...@@ -43,8 +43,7 @@ module.exports = { ...@@ -43,8 +43,7 @@ module.exports = {
.rightClick('[data-path="5_Renamed_Contract.sol"]') .rightClick('[data-path="5_Renamed_Contract.sol"]')
.click('*[id="menuitemdelete"]') .click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000) .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.click('.modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"')
}, },
...@@ -75,7 +74,7 @@ module.exports = { ...@@ -75,7 +74,7 @@ module.exports = {
.click('*[id="menuitemdelete"]') .click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000) .pause(2000)
.click('.modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]')
}, },
...@@ -88,11 +87,11 @@ module.exports = { ...@@ -88,11 +87,11 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000) .pause(2000)
.click('.modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000) .pause(2000)
.click('.modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000) .pause(2000)
.perform((done) => { .perform((done) => {
if (runtimeBrowser === 'chrome') { if (runtimeBrowser === 'chrome') {
......
...@@ -38,7 +38,7 @@ module.exports = { ...@@ -38,7 +38,7 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.click('.modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(10000) .pause(10000)
.getText('[data-id="default_workspaceModalDialogModalBody-react"]', (result) => { .getText('[data-id="default_workspaceModalDialogModalBody-react"]', (result) => {
console.log(result) console.log(result)
...@@ -99,7 +99,7 @@ module.exports = { ...@@ -99,7 +99,7 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.pause(2000) .pause(2000)
.click('.modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(10000) .pause(10000)
.getText('[data-id="default_workspaceModalDialogModalBody-react"]', (result) => { .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.') 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.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment