<commit_before>var utils = require('./_nav-utils.js');

casper.test.begin('Login from home page', function(test) {

    utils.setUp();

    casper.start(utils.baseurl + '/', function () {
        test.assertUrlMatch('/login/?next=/', 'Redirects to login page.');
        test.assertExists('form', 'Form present.');
    });

    casper.then(function () {
        casper.fill('form', {
            'username':    'admin',
            'password':    '<PASSWORD>',
        }, true);
        casper.click("button[type='submit']");
    });

    casper.then(function () {
        test.assertUrlMatch('/', 'Logged-in and redirected.');
        utils.saveCookies();
    });

    casper.run(function done() {
        test.done();
    });
});
<commit_msg>Output HTML to test travis's output, build fail remotely but not locally.<commit_after>var utils = require('./_nav-utils.js');

casper.test.begin('Login from home page', function(test) {

    utils.setUp();

    casper.start(utils.baseurl + '/', function () {
        test.assertUrlMatch('/login/?next=/', 'Redirects to login page.');
        test.assertExists('form', 'Form present.');
    });

    casper.then(function() {
        require('utils').dump(this.getPageContent());
    });

    casper.then(function () {
        casper.fill('form', {
            'username':    'admin',
            'password':    '<PASSWORD>',
        }, true);
        casper.click("button[type='submit']");
    });

    casper.then(function () {
        test.assertUrlMatch('/', 'Logged-in and redirected.');
        utils.saveCookies();
    });

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

{'fraction_non_alphanumeric': 0.1926829268292683, 'fraction_numerical': 0.0, 'mean_word_length': 2.4693446088794926, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7457696', 'n_tokens_mistral': 505, 'n_tokens_neox': 497, 'n_words': 85}