zulip/frontend_tests/casperjs
Eklavya Sharma e0dbaf1031 Use universal_newlines=True in subprocess.check_output.
In python 3, subprocess uses bytes for input and output if
universal_newlines=False (the default).  It uses str for input and
output if universal_newlines=True.

Since we mostly deal with strings, add universal_newlines=True to
subprocess.check_output.
2016-07-26 12:06:41 -07:00
..
batchbin Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
bin Use universal_newlines=True in subprocess.check_output. 2016-07-26 12:06:41 -07:00
modules Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
rpm Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
rubybin Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
samples Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
tests Revert "Close HTML singleton tags in Casper files." 2016-07-12 13:35:50 -07:00
.gitignore Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
.gitmodules Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
.jshintconfig Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
.jshintignore Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
.travis.yml Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
CHANGELOG.md Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
CONTRIBUTING.md Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
CONTRIBUTORS.md Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
LICENSE.md Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
README.md Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
casperjs.gemspec Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00
package.json Move frontend tests out of zerver/tests/. 2015-10-28 10:11:47 -07:00

README.md

CasperJS Build Status

CasperJS is a navigation scripting & testing utility for PhantomJS. It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntaxic sugar for doing common tasks such as:

Browse the sample examples repository. Don't hesitate to pull request for any cool example of yours as well!

Read the full documentation on casperjs dedicated website.

Subscribe to the project mailing-list

Follow the CasperJS project on twitter and Google+.

Show me some code!

Sample test to see if some dropdown can be opened:

casper.start('http://twitter.github.com/bootstrap/javascript.html#dropdowns', function() {
    this.test.assertExists('#navbar-example');
    this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle');
    this.waitUntilVisible('#dropdowns .nav-pills .open', function() {
        this.test.pass('Dropdown is open');
    });
});

casper.run(function() {
    this.test.done();
});

Run the script:

Contributing

Contributing code

Please read the CONTRIBUTING.md file contents.

Contributing documentation

CasperJS's documentation is written using the Markdown format, and hosted on Github thanks to the Github Pages Feature.

To view the source files on github, head to the gh-pages branch, and check the documentation's README for further instructions.