Support Node.js 0.10–6 (#132)

* Update dependencies

* Switch from jsdom to cheerio

* Update the supported Node.js versions

* Recompile the client-side CSS and JS
This commit is contained in:
Rowan Manning
2016-05-26 15:33:58 +01:00
committed by Andrew Mee
parent 6bfb4f72d9
commit ae6208d87e
18 changed files with 177 additions and 183 deletions

View File

@@ -32,14 +32,14 @@ describe('GET /<task-id>/delete', function() {
});
it('should have a "Delete URL" form', function() {
var form = this.last.dom.querySelectorAll('[data-test=delete-url-form]')[0];
var form = this.last.dom('[data-test=delete-url-form]').eq(0);
assert.isDefined(form);
assert.strictEqual(form.getAttribute('action'), '/abc000000000000000000001/delete');
assert.strictEqual(form.getAttribute('method'), 'post');
assert.strictEqual(form.attr('action'), '/abc000000000000000000001/delete');
assert.strictEqual(form.attr('method'), 'post');
});
it('should display a link back to the task page', function() {
assert.greaterThan(this.last.dom.querySelectorAll('[href="/abc000000000000000000001"]').length, 0);
assert.greaterThan(this.last.dom('[href="/abc000000000000000000001"]').length, 0);
});
});
@@ -70,9 +70,9 @@ describe('POST /<task-id>/delete', function() {
});
it('should display a success message', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /been deleted/i);
assert.match(alert.text(), /been deleted/i);
});
});