Files
pa11y-dashboard/test/functional/index.js
2013-11-21 09:58:44 +00:00

32 lines
677 B
JavaScript

/* global beforeEach, describe, it */
/* jshint maxlen: 200, maxstatements: 20 */
'use strict';
var assert = require('proclaim');
describe('GET /', function () {
describe('with no query', function () {
beforeEach(function (done) {
var req = {
method: 'GET',
endpoint: '/'
};
this.navigate(req, done);
});
it('should send a 200 status', function () {
assert.strictEqual(this.last.status, 200);
});
it('should have an "Add new URL" button', function () {
var elem = this.last.dom.querySelectorAll('[data-test=add-task]');
assert.strictEqual(elem.length, 1);
assert.strictEqual(elem[0].getAttribute('href'), '/new');
});
});
});