Commit 9fe5b43c 9fe5b43c1272bd5c2e4d7706607b85e4ab112f24 by Dave Lee

Relocate findAll() test to its rightful place

1 parent 15e19111
......@@ -52,6 +52,7 @@ function fakeDocument(html) {
// scoped
var scope = 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.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
var scope = 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');
fakeDocument(null);
})(casper);
......