From 015ce64c8287a027e6adf673ee7b0c36c07a8a45 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 17 Mar 2023 15:11:13 +0530 Subject: [PATCH] use data id for delete ws --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 4c92ad6be3..84536cf037 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -433,15 +433,14 @@ module.exports = { 'Should delete a workspace #group1': function (browser: NightwatchBrowser) { browser - .switchWorkspace('workspace_name_1')//*[@id="workspacesMenuDropdown"]/span - .useXpath() - .click('//*[@id="workspacesMenuDropdown"]/span/i') - .click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') // delete workspace_name_1 - .waitForElementVisible('//*[@id="fileExplorerView"]/div[2]/div/div/div[2]') - .click('//*[@id="fileExplorerView"]/div[2]/div/div/div[3]/button') - .waitForElementVisible('//*[@id="workspacesSelect"]') - .click('//*[@id="workspacesSelect"]') - .useCss() + .switchWorkspace('workspace_name_1') + .click('*[data-id="workspaceDropdownMenuIcon"]') + .waitForElementVisible('*[data-id="wsdropdownMenu"]') + .click('*[data-id="workspacedelete"]') // delete workspace_name_1 + .waitForElementVisible('*[data-id="fileSystemModalDialogModalFooter-react"]') + .click('*[data-id="fileSystem-modal-footer-ok-react"]') + .waitForElementVisible('*[data-id="workspacesSelect"]') + .click('*[data-id="workspacesSelect"]') .waitForElementNotPresent(`[data-id="dropdown-item-workspace_name_1"]`) .end() },