Commit d7d1d38c d7d1d38cf0e1a9cba7b5efad48d399ba8613796a by Mickaël Andrieu

Merge pull request #794 from n1k0/feat-clientutils-injection

Feat clientutils injection
2 parents 1d1fb3c4 0e6a844a
......@@ -885,4 +885,4 @@
return [].some.call(this.findAll(selector), this.elementVisible);
};
};
})(typeof exports === "object" ? exports : window);
})(typeof exports === "object" && !(exports instanceof Element) ? exports : window);
......
File mode changed
......@@ -16,5 +16,6 @@
<input type="text" name="dummy_name" value="dummy_value" />
<h1>Title</h1>
<p id="hidden" style="display:none">I'm hidden.</p>
<div id="exports">Exports</div>
</body>
</html>
......
......@@ -2,7 +2,7 @@
/*jshint strict:false, maxstatements:99*/
var fs = require('fs');
casper.test.begin('Common assertions tests', 46, function(test) {
casper.test.begin('Common assertions tests', 47, function(test) {
casper.start('tests/site/index.html', function() {
test.assertTextExists('form', 'Tester.assertTextExists() checks that page body contains text');
test.assertTextExist('form', 'Tester.assertTextExist() checks that page body contains text [alias]');
......@@ -66,6 +66,7 @@ casper.test.begin('Common assertions tests', 46, function(test) {
test.assertVisible('img', 'Tester.assertVisible() works as expected');
test.assertNotVisible('p#hidden', 'Tester.assertNotVisible() works as expected');
test.assertInvisible('p#hidden', 'Tester.assertInvisible() works as expected [alias]');
test.assertExists('div#exports', 'Tester.assertExists() works as expected with reserved word id');
}).run(function() {
test.done();
});
......