|
|
@ -13,7 +13,7 @@ class AddFile extends EventEmitter { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function addFile (browser: NightwatchBrowser, name: string, content: NightwatchContractContent, done: VoidFunction) { |
|
|
|
function addFile(browser: NightwatchBrowser, name: string, content: NightwatchContractContent, done: VoidFunction) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.saveScreenshot('./reports/screenshots/addFile.png') |
|
|
|
.saveScreenshot('./reports/screenshots/addFile.png') |
|
|
|
.isVisible({ |
|
|
|
.isVisible({ |
|
|
@ -37,10 +37,9 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC |
|
|
|
abortOnFailure: false, |
|
|
|
abortOnFailure: false, |
|
|
|
suppressNotFoundErrors: true, |
|
|
|
suppressNotFoundErrors: true, |
|
|
|
timeout: 2000 |
|
|
|
timeout: 2000 |
|
|
|
}) |
|
|
|
}, (okVisible) => { |
|
|
|
.elements('css selector', `li[data-id="treeViewLitreeViewItem${name}"]`, (res) => { |
|
|
|
// @ts-ignore
|
|
|
|
console.log(res) |
|
|
|
if (okVisible.status === 0) { |
|
|
|
if (res.value && (res.value as any).length > 0) { |
|
|
|
|
|
|
|
browser.openFile(name) |
|
|
|
browser.openFile(name) |
|
|
|
.perform(function () { |
|
|
|
.perform(function () { |
|
|
|
done() |
|
|
|
done() |
|
|
|