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 @@ ...@@ -885,4 +885,4 @@
885 return [].some.call(this.findAll(selector), this.elementVisible); 885 return [].some.call(this.findAll(selector), this.elementVisible);
886 }; 886 };
887 }; 887 };
888 })(typeof exports === "object" ? exports : window); 888 })(typeof exports === "object" && !(exports instanceof Element) ? exports : window);
......
File mode changed
...@@ -16,5 +16,6 @@ ...@@ -16,5 +16,6 @@
16 <input type="text" name="dummy_name" value="dummy_value" /> 16 <input type="text" name="dummy_name" value="dummy_value" />
17 <h1>Title</h1> 17 <h1>Title</h1>
18 <p id="hidden" style="display:none">I'm hidden.</p> 18 <p id="hidden" style="display:none">I'm hidden.</p>
19 <div id="exports">Exports</div>
19 </body> 20 </body>
20 </html> 21 </html>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 /*jshint strict:false, maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 var fs = require('fs'); 3 var fs = require('fs');
4 4
5 casper.test.begin('Common assertions tests', 46, function(test) { 5 casper.test.begin('Common assertions tests', 47, function(test) {
6 casper.start('tests/site/index.html', function() { 6 casper.start('tests/site/index.html', function() {
7 test.assertTextExists('form', 'Tester.assertTextExists() checks that page body contains text'); 7 test.assertTextExists('form', 'Tester.assertTextExists() checks that page body contains text');
8 test.assertTextExist('form', 'Tester.assertTextExist() checks that page body contains text [alias]'); 8 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) { ...@@ -66,6 +66,7 @@ casper.test.begin('Common assertions tests', 46, function(test) {
66 test.assertVisible('img', 'Tester.assertVisible() works as expected'); 66 test.assertVisible('img', 'Tester.assertVisible() works as expected');
67 test.assertNotVisible('p#hidden', 'Tester.assertNotVisible() works as expected'); 67 test.assertNotVisible('p#hidden', 'Tester.assertNotVisible() works as expected');
68 test.assertInvisible('p#hidden', 'Tester.assertInvisible() works as expected [alias]'); 68 test.assertInvisible('p#hidden', 'Tester.assertInvisible() works as expected [alias]');
69 test.assertExists('div#exports', 'Tester.assertExists() works as expected with reserved word id');
69 }).run(function() { 70 }).run(function() {
70 test.done(); 71 test.done();
71 }); 72 });
......