remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/helpers/dom.js

20 lines
548 B

'use strict'
module.exports = {
listSelectorContains: listSelectorContains
}
function listSelectorContains (textsToFind, selector, browser, callback) {
browser
.elements('css selector', selector, function (warnings) {
warnings.value.map(function (warning, index) {
browser.elementIdText(warning.ELEMENT, function (text) {
browser.assert.equal(text.value.indexOf(textsToFind[index]) !== -1, true)
if (index === warnings.value.length - 1) {
callback()
}
})
})
})
}