提交 a3a67209 编写于 作者: P Phil Hughes

Fixed issue with expand diff not initializing resolve buttons

上级 69c7fc5f
......@@ -59,14 +59,15 @@
if (data.html) {
_this.content = $(data.html);
_this.content.syntaxHighlight();
if (typeof DiffNotesApp !== 'undefined') {
DiffNotesApp.compileComponents();
}
} else {
_this.hasError = true;
_this.content = $(ERROR_HTML);
}
return _this.collapsedContent.after(_this.content);
_this.collapsedContent.after(_this.content);
if (typeof DiffNotesApp !== 'undefined') {
DiffNotesApp.compileComponents();
}
};
})(this));
};
......
......@@ -4,7 +4,7 @@
//= require diff_notes/stores/comments
(() => {
function createDiscussion(noteId = 1, resolved = true) {
CommentsStore.create('a', noteId, resolved, 'test');
CommentsStore.create('a', noteId, true, resolved, 'test');
};
beforeEach(() => {
......@@ -91,6 +91,7 @@
it('is unresolved with 2 notes', () => {
const discussion = CommentsStore.state['a'];
createDiscussion(2, false);
console.log(discussion.isResolved());
expect(discussion.isResolved()).toBe(false);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册