|
|
@ -16,6 +16,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.clickLaunchIcon('udapp') |
|
|
|
browser.clickLaunchIcon('udapp') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
|
|
|
.waitForElementVisible('li[data-id="treeViewDivtreeViewItem.txt"]') |
|
|
|
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]').pause(1000) // focus on root directory
|
|
|
|
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]').pause(1000) // focus on root directory
|
|
|
|
.elements('css selector', `li[data-id="treeViewLitreeViewItem${name}"]`, (res) => { |
|
|
|
.elements('css selector', `li[data-id="treeViewLitreeViewItem${name}"]`, (res) => { |
|
|
|
if (res.value && (res.value as any).length > 0) { |
|
|
|
if (res.value && (res.value as any).length > 0) { |
|
|
|