mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 14:21:13 +00:00
32 lines
677 B
JavaScript
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');
|
|
});
|
|
|
|
});
|
|
|
|
});
|