|
|
@ -25,15 +25,12 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC |
|
|
|
done() |
|
|
|
done() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const txtFile = name + '.txt' |
|
|
|
|
|
|
|
browser.click('[data-id="fileExplorerNewFilecreateNewFile"]') |
|
|
|
browser.click('[data-id="fileExplorerNewFilecreateNewFile"]') |
|
|
|
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000) |
|
|
|
.waitForElementContainsText('*[data-id$="/blank"]', '', 60000) |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', txtFile) |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', name) |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) |
|
|
|
.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) |
|
|
|
.pause(2000) |
|
|
|
.pause(2000) |
|
|
|
.waitForElementVisible(`li[data-id="treeViewLitreeViewItem${txtFile}"]`, 60000) |
|
|
|
.waitForElementVisible(`li[data-id="treeViewLitreeViewItem${name}"]`, 60000) |
|
|
|
.renamePath(txtFile, name.split('/').pop(), name) |
|
|
|
|
|
|
|
.openFile(name) |
|
|
|
|
|
|
|
.setEditorValue(content.content) |
|
|
|
.setEditorValue(content.content) |
|
|
|
.pause(1000) |
|
|
|
.pause(1000) |
|
|
|
.perform(function () { |
|
|
|
.perform(function () { |
|
|
|