|
|
|
@ -42,20 +42,4 @@ function runTests (browser: NightwatchBrowser) { |
|
|
|
|
.clickLaunchIcon('solidityStaticAnalysis') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function listSelectorContains (textsToFind: string[], selector: string, browser: NightwatchBrowser, callback: VoidFunction) { |
|
|
|
|
browser.execute(function (selector) { |
|
|
|
|
const items = document.querySelectorAll(selector) |
|
|
|
|
const ret = [] |
|
|
|
|
for (let k = 0; k < items.length; k++) { |
|
|
|
|
ret.push(items[k].innerText) |
|
|
|
|
} |
|
|
|
|
return ret |
|
|
|
|
}, [selector], function (result) { |
|
|
|
|
console.log(result.value) |
|
|
|
|
for (const k in textsToFind) { |
|
|
|
|
console.log('testing `' + result.value[k] + '` against `' + textsToFind[k] + '`') |
|
|
|
|
browser.assert.equal(result.value[k].indexOf(textsToFind[k]) !== -1, true) |
|
|
|
|
} |
|
|
|
|
callback() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|