pull/5370/head
yann300 4 years ago
parent 2378304cd0
commit 7827a965a4
  1. 6
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  2. 14
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  3. 4
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -40,11 +40,7 @@ module.exports = {
'Should delete file `5_Renamed_Contract.sol` from file explorer': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"]')
.rightClick('[data-path="5_Renamed_Contract.sol"]')
.click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.removeFile('5_Renamed_Contract.sol', 'default_workspace')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"')
},

@ -34,18 +34,16 @@ module.exports = {
browser
.clickLaunchIcon('fileExplorers')
.click('*[data-id="workspaceCreate"]') // create workspace_name
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.clearValue('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'workspace_name')
.modalFooterOKClick()
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name' })
.click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.addFile('test.sol', { content: 'test' })
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]')
.click('*[data-id="workspaceCreate"]') // create workspace_name_1
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.clearValue('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'workspace_name_1')
.modalFooterOKClick()
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' })
.click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]')
.click('*[data-id="workspacesSelect"] option[value="workspace_name"]')

@ -259,7 +259,7 @@ export const Workspace = (props: WorkspaceProps) => {
return (
<>
<span>{ state.modal.message }</span>
<input data-id="modalDialogCustomPromptText" placeholder={`workspace_${Date.now()}`} ref={workspaceCreateInput} className="form-control" />
<input type="text" data-id="modalDialogCustomPromptTextCreate" placeholder={`workspace_${Date.now()}`} ref={workspaceCreateInput} className="form-control" />
</>
)
}
@ -268,7 +268,7 @@ export const Workspace = (props: WorkspaceProps) => {
return (
<>
<span>{ state.modal.message }</span>
<input data-id="modalDialogCustomPromptText" placeholder={ state.currentWorkspace } ref={workspaceRenameInput} className="form-control" />
<input type="text" data-id="modalDialogCustomPromptTextRename" placeholder={ state.currentWorkspace } ref={workspaceRenameInput} className="form-control" />
</>
)
}

Loading…
Cancel
Save