initial pagination rewrite, cleanups to comment edit

This commit is contained in:
Wyatt Johnson
2017-05-11 17:27:02 -06:00
parent 5c5d014e23
commit d497ad3369
14 changed files with 721 additions and 743 deletions
+10 -1
View File
@@ -64,6 +64,9 @@ describe('graph.mutations.editComment', () => {
console.error(response.errors);
}
expect(response.errors).to.be.empty;
if (response.data.editComment.errors && response.data.editComment.errors.length > 0) {
console.error(response.data.editComment.errors);
}
expect(response.data.editComment.errors).to.be.null;
// assert body has changed
@@ -97,9 +100,12 @@ describe('graph.mutations.editComment', () => {
body: newBody
}
});
if (response.errors && response.errors.length > 0) {
console.error(response.errors);
}
expect(response.errors).to.be.empty;
expect(response.data.editComment.errors).to.not.be.empty;
expect(response.data.editComment.errors[0].translation_key).to.equal('error.editWindowExpired');
expect(response.data.editComment.errors[0].translation_key).to.equal('EDIT_WINDOW_ENDED');
const commentAfterEdit = await CommentsService.findById(comment.id);
// it *hasn't* changed from the original
@@ -144,6 +150,9 @@ describe('graph.mutations.editComment', () => {
body: newBody
}
});
if (response.errors && response.errors.length > 0) {
console.error(response.errors);
}
expect(response.errors).to.be.empty;
expect(response.data.editComment.errors[0].translation_key).to.equal('NOT_FOUND');
});