Skip to content

Commit 26b738a

Browse files
committed
test: adjust calc for focus clicks taking into account the gap
1 parent 80e2e1a commit 26b738a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

__tests__/html/transcript.navigation.focusActivity.byClick.onEdges.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@
4545
// THEN: It should focus on the last activity.
4646
expect(pageElements.focusedActivity()).toBe(lastActivity);
4747

48-
// WHEN: Clicking on the pixel above the top left-most pixel of the last activity.
49-
await host.clickAt(lastActivityClientRect.left, lastActivityClientRect.top - 1);
48+
// WHEN: Clicking on the 9 pixels above the top left-most pixel of the last activity.
49+
await host.clickAt(lastActivityClientRect.left, lastActivityClientRect.top - 9);
50+
51+
// THEN: It should still focus on the last activity.
52+
expect(pageElements.focusedActivity()).toBe(lastActivity);
53+
54+
// WHEN: Clicking on the 10 pixels above the top left-most pixel of the last activity.
55+
await host.clickAt(lastActivityClientRect.left, lastActivityClientRect.top - 10);
5056

5157
// THEN: It should focus on the second last activity.
5258
expect(pageElements.focusedActivity()).toBe(secondLastActivity);

0 commit comments

Comments
 (0)