diff --git a/apps/remix-ide-e2e/src/commands/removeFile.ts b/apps/remix-ide-e2e/src/commands/removeFile.ts index 91ba3d2216..d8e129ccdf 100644 --- a/apps/remix-ide-e2e/src/commands/removeFile.ts +++ b/apps/remix-ide-e2e/src/commands/removeFile.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() diff --git a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts index 93b7d8d055..744dd8c620 100644 --- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts @@ -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') { diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 4b6e191ada..4ebcb17e22 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -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.')