var https = require('https');
var SauceLabs = require("saucelabs");

module.exports = {

    '@tags': ['rookeries'],

    'Title assertion': function(client) {
        client
            .url('http://localhost:3000')
            .waitForElementVisible('body', 1000)
            .assert.title('Rookeries');
    },

    // TODO: Extract base url from passed in parameter rather than being hardcoded.
    'License assertion': function(client) {
        client
            .url('http://localhost:3000/license')
            .waitForElementVisible('body', 1000)
            .assert.visible('License (AGPL)');
    },

    afterEach: function(client, done) {
        client.customSauceEnd();

        setTimeout(function() {
            done();
        }, 1000);

    }

};