From 79a6575cdc228914b2e34d70c6d36ae48822c9f7 Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Wed, 8 Sep 2021 12:07:59 +0100 Subject: [PATCH] added waitForElementToPresent in workspace test --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 0ed4417425..88ae165fe3 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -51,8 +51,8 @@ module.exports = { .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') // eslint-disable-next-line dot-notation .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' }) - .waitForElementPresent('span[data-id="workspacesModalDialog-modal-footer-ok-react"] .modal-ok') - .click('span[data-id="workspacesModalDialog-modal-footer-ok-react"] .modal-ok') + .waitForElementPresent('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') + .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .pause(1000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') @@ -67,8 +67,9 @@ module.exports = { .waitForElementVisible('*[data-id="modalDialogCustomPromptTextRename"]') // eslint-disable-next-line dot-notation .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextRename"]')['value'] = 'workspace_name_renamed' }) - .waitForElementPresent('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') - .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') + // span[data-id="workspacesModalDialog-modal-footer-ok-react"] + .waitForElementPresent('span[data-id="workspacesModalDialog-modal-footer-ok-react"]') + .click('span[data-id="workspacesModalDialog-modal-footer-ok-react"]') .click('*[data-id="workspacesSelect"] option[value="workspace_name_1"]') .pause(1000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') @@ -80,7 +81,7 @@ module.exports = { browser .click('*[data-id="workspacesSelect"] option[value="workspace_name_1"]') .click('*[data-id="workspaceDelete"]') // delete workspace_name_1 - .waitForElementVisible('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') + .waitForElementVisible('span[data-id="workspacesModalDialog-modal-footer-ok-react"]') .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .waitForElementNotPresent('*[data-id="workspacesSelect"] option[value="workspace_name_1"]') .end()