added data-id to addFile click event

pull/1342/head
davidzagi93@gmail.com 3 years ago
parent 472486c818
commit 5395fe515a
  1. 8
      apps/remix-ide-e2e/src/commands/addFile.ts
  2. 3
      apps/remix-ide-e2e/src/tests/workspace.test.ts

@ -16,11 +16,9 @@ class AddFile extends EventEmitter {
function addFile (browser: NightwatchBrowser, name: string, content: NightwatchContractContent, done: VoidFunction) {
browser.clickLaunchIcon('udapp')
.clickLaunchIcon('filePanel')
.pause(1000)
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]')
.pause(1000) // focus on root directory
.click('.newFile')
.pause(2000)
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory
// .click('.newFile')
.click('[data-id="fileExplorerNewFilecreateNewFile"]')
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000)
.sendKeys('*[data-id$="/blank"] .remixui_items', name)
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)

@ -37,7 +37,7 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
// eslint-disable-next-line dot-notation
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name' })
.waitForElementPresent('span[data-id="workspacesModalDialog-modal-footer-ok-react"]')
.waitForElementVisible('[data-id="workspacesModalDialogModalDialogModalFooter-react"] > span')
.click('span[data-id="workspacesModalDialog-modal-footer-ok-react"]')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.pause(1000)
@ -49,6 +49,7 @@ module.exports = {
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' })
.click('[data-id="workspacesModalDialogModalDialogModalFooter-react"] > span')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.pause(5000)
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]')
.pause(5000)
.click('*[data-id="workspacesSelect"] option[value="workspace_name"]')

Loading…
Cancel
Save