fix(comments) : show notified threads in inbox and stop edit notifications
This commit is contained in:
@@ -34,6 +34,17 @@ describe("Thai comment UI", () => {
|
||||
expect(html).not.toContain("No matching comments");
|
||||
});
|
||||
|
||||
it("renders the notification conversation once in the regular inbox table", () => {
|
||||
const selected = { ...comment, id: "selected", text: "การสนทนาที่เลือก" };
|
||||
const html = renderToStaticMarkup(<AdminCommentInbox initial={{ items: [comment, selected], nextCursor: null, viewer }}
|
||||
targets={[]} initialTarget={comment.target} initialComment={selected.id} />);
|
||||
expect(html).not.toContain("การสนทนาจากการแจ้งเตือน");
|
||||
expect(html.match(/id="comment-selected"/g)).toHaveLength(1);
|
||||
expect(html.indexOf('id="comment-selected"')).toBeLessThan(html.indexOf('id="comment-test"'));
|
||||
expect(html.slice(html.indexOf("<tbody"), html.indexOf("</tbody>"))).toContain('id="comment-selected"');
|
||||
expect(html).not.toContain("<article");
|
||||
});
|
||||
|
||||
it("renders editing controls in Thai while preserving the draft", () => {
|
||||
const html = renderToStaticMarkup(<CommentComposer target="guide:test" editing={comment} onSaved={() => {}} />);
|
||||
expect(html).toContain("บันทึกการแก้ไข");
|
||||
|
||||
Reference in New Issue
Block a user