minor test improvement
This commit is contained in:
parent
d58e2e9db7
commit
9868065089
1 changed files with 5 additions and 4 deletions
|
@ -374,16 +374,17 @@ test("Reply to a comment from another instance, get notification", async () => {
|
||||||
expect(replyRes.comment_view.counts.score).toBe(1);
|
expect(replyRes.comment_view.counts.score).toBe(1);
|
||||||
|
|
||||||
// Make sure that reply comment is seen on alpha
|
// Make sure that reply comment is seen on alpha
|
||||||
// TODO not sure why, but a searchComment back to alpha, for the ap_id of betas
|
let commentSearch = await waitUntil(
|
||||||
// comment, isn't working.
|
() => resolveComment(alpha, replyRes.comment_view.comment),
|
||||||
// let searchAlpha = await searchComment(alpha, replyRes.comment);
|
c => c.comment?.counts.score === 1,
|
||||||
|
);
|
||||||
|
let alphaComment = commentSearch.comment!;
|
||||||
let postComments = await waitUntil(
|
let postComments = await waitUntil(
|
||||||
() => getComments(alpha, postOnAlphaRes.post_view.post.id),
|
() => getComments(alpha, postOnAlphaRes.post_view.post.id),
|
||||||
pc => pc.comments.length >= 2,
|
pc => pc.comments.length >= 2,
|
||||||
);
|
);
|
||||||
// Note: this test fails when run twice and this count will differ
|
// Note: this test fails when run twice and this count will differ
|
||||||
expect(postComments.comments.length).toBeGreaterThanOrEqual(2);
|
expect(postComments.comments.length).toBeGreaterThanOrEqual(2);
|
||||||
let alphaComment = postComments.comments[0];
|
|
||||||
expect(alphaComment.comment.content).toBeDefined();
|
expect(alphaComment.comment.content).toBeDefined();
|
||||||
|
|
||||||
expect(getCommentParentId(alphaComment.comment)).toBe(
|
expect(getCommentParentId(alphaComment.comment)).toBe(
|
||||||
|
|
Loading…
Reference in a new issue