Skip to content

Commit

Permalink
[#67095] fix comment drag test
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Oct 10, 2024
1 parent 2c0ef4d commit c4051d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/myst-editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ test.describe.parallel("With collaboration enabled", () => {
await addComment(pageA, 1);

// Drag the comment
const initialCommentPosition = await pageA
.locator(".comment-wrapper")
.first()
.evaluate(e => Number(e.parentElement?.getAttribute("top")));
const placesForCommentA = await pageA.locator(".comment-gutter-icon").all();
const from = await pageA.locator(".comment-icon").boundingBox() as
{ x: number; y: number; width: number; height: number; };
Expand All @@ -271,7 +275,7 @@ test.describe.parallel("With collaboration enabled", () => {
.locator(".comment-wrapper")
.first()
.evaluate(e => Number(e.parentElement?.getAttribute("top")));
expect(newCommentPosition - to.x).toBeLessThan(to.height);
expect(newCommentPosition ).not.toEqual(initialCommentPosition);
});


Expand Down

0 comments on commit c4051d6

Please sign in to comment.