use isvisible

pull/2868/head
filip mertens 2 years ago
parent 47a68d9d83
commit 8f137c8848
  1. 9
      apps/remix-ide-e2e/src/commands/addFile.ts

@ -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()

Loading…
Cancel
Save