From ec179768e191cda276f3eb4c6667829ba5e8f755 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Sep 2021 02:58:09 +0100 Subject: [PATCH] Fixed file-explorer tests --- apps/remix-ide-e2e/src/commands/removeFile.ts | 4 ++-- apps/remix-ide-e2e/src/tests/fileExplorer.test.ts | 13 +++++++------ .../workspace/src/lib/remix-ui-workspace.tsx | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/removeFile.ts b/apps/remix-ide-e2e/src/commands/removeFile.ts index de0d2b343b..dc023bf3a1 100644 --- a/apps/remix-ide-e2e/src/commands/removeFile.ts +++ b/apps/remix-ide-e2e/src/commands/removeFile.ts @@ -39,8 +39,8 @@ function removeFile (browser: NightwatchBrowser, path: string, workspace: string .pause(2000) .perform(() => { console.log(path, 'to remove') - browser.waitForElementVisible('*[data-id="' + workspace + 'ModalDialogContainer-react"] .modal-ok') - .click('*[data-id="' + workspace + 'ModalDialogContainer-react"] .modal-ok') + browser.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .click('[data-id="fileSystemModalDialogModalFooter-react"] .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 1fbece139f..267daa9e1c 100644 --- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts @@ -68,9 +68,9 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') .rightClick('[data-path="Browser_E2E_Tests"]') .click('*[id="menuitemdelete"]') - .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000) + .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok', 60000) .pause(2000) - .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') + .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') }, @@ -81,13 +81,13 @@ module.exports = { .pause(10000) .waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]') - .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000) + .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok', 60000) .pause(2000) - .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') + .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .pause(2000) - .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000) + .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok', 60000) .pause(2000) - .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') + .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .pause(2000) .perform((done) => { if (runtimeBrowser === 'chrome') { @@ -101,6 +101,7 @@ module.exports = { 'Should open local filesystem explorer': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') + .click('[data-id="remixUIWorkspaceExplorer"]') .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 861719aad4..2a92f3b9c6 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -119,7 +119,7 @@ export function Workspace () { return (
-
+