@@ -47,7 +47,7 @@ def test_delete_comment_scrolls_to_previous_comment(alice):
|
||||
expect(page.locator(f".comment-text:has-text('{target}')")).to_have_count(0)
|
||||
|
||||
page.wait_for_function(
|
||||
"expected => Math.abs(window.scrollY - expected) < 120",
|
||||
"expected => { const max = document.documentElement.scrollHeight - window.innerHeight; return Math.abs(window.scrollY - Math.min(expected, max)) < 120; }",
|
||||
arg=anchor_top,
|
||||
)
|
||||
expect(previous_wrapper).to_be_visible()
|
||||
|
||||
Reference in New Issue
Block a user