From 18f8045fcf1ffc7bb092386760c59146a92807e7 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 20 Feb 2023 12:33:50 +0100 Subject: [PATCH] e2e --- .../src/tests/workspace_git.test.ts | 53 +++++++------------ 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts index a60a3fb776..fd2c261493 100644 --- a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts @@ -63,12 +63,10 @@ module.exports = { 'Should clone a repository #group2': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('filePanel') - .useXpath() - .waitForElementVisible('[data-id="workspaceDropdownMenuIcon"]') - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="initGitRepositoryLabel"]') - .click('[data-id="workspaceclone]"') - .useCss() + .waitForElementVisible('[data-id="workspaceMenuDropdown"]') + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceclone"]') + .click('[data-id="workspaceclone"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') @@ -91,11 +89,9 @@ module.exports = { 'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) { browser - .useXpath() - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="workspaceclone]"') - .click('[data-id="workspaceclone]"') - .useCss() + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceclone"]') + .click('[data-id="workspaceclone"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') @@ -103,11 +99,9 @@ module.exports = { .click('[data-id="fileSystem-modal-footer-ok-react"]') .pause(5000) .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1') - .useXpath() - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="workspaceclone]"') - .click('[data-id="workspaceclone]"') - .useCss() + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceclone"]') + .click('[data-id="workspaceclone"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') @@ -115,10 +109,8 @@ module.exports = { .click('[data-id="fileSystem-modal-footer-ok-react"]') .pause(5000) .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2') - .useXpath() - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="workspaceclone]"') - .useCss() + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceDropdownMenuIcon]"') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') @@ -134,15 +126,10 @@ module.exports = { 'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) { browser - .useXpath() - .waitForElementPresent({ - selector: '[data-id="workspaceDropdownMenuIcon"]', - locateStrategy: 'xpath', - }) - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="workspaceclone]"') - .click('[data-id="workspaceclone]"') - .useCss() + .waitForElementVisible('[data-id="workspaceDropdownMenuIcon"]') + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceclone"]') + .click('[data-id="workspaceclone"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') @@ -161,11 +148,9 @@ module.exports = { browser .clickLaunchIcon('filePanel') .waitForElementNotVisible('[data-id="workspaceGitPanel"]') - .useXpath() - .click('[data-id="workspaceDropdownMenuIcon"]') - .waitForElementVisible('[data-id="workspaceclone]"') - .click('[data-id="workspaceclone]"') - .useCss() + .click('[data-id="workspaceMenuDropdown"]') + .waitForElementVisible('[data-id="workspaceclone"]') + .click('[data-id="workspaceclone"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') .click('[data-id="fileSystemModalDialogModalBody-react"]') .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]')