casper.test.assertType(clientutils.findAll('li',scope),'nodelist','ClientUtils.findAll() can find matching DOM elements within a given scope');
casper.test.assertEquals(clientutils.findAll('li',scope).length,2,'ClientUtils.findAll() can find matching DOM elements within a given scope');
casper.test.assertType(clientutils.findAll(x('//li'),scope),'array','ClientUtils.findAll() can find matching DOM elements using XPath within a given scope');
fakeDocument(null);
})(casper);
...
...
@@ -65,7 +66,6 @@ function fakeDocument(html) {
// scoped
varscope=clientutils.findOne('ul');
casper.test.assertType(clientutils.findAll('li',scope),'nodelist','ClientUtils.findAll() can find matching DOM elements within a given scope');
casper.test.assertEquals(clientutils.findAll('li',scope).length,2,'ClientUtils.findAll() can find matching DOM elements within a given scope');
casper.test.assertType(clientutils.findOne(x('//li'),scope),'htmllielement','ClientUtils.findOne() can find a matching DOM element using XPath within a given scope');