Commit de197c7
committed
fix(test): stabilize scrollToComment WebKit behavior test
After scrolling to top, the DomPainter may re-render pages and
temporarily remove comment highlight elements from the DOM. On WebKit
this window is long enough to cause scrollToComment to return false.
- Use behavior:'auto' (instant scroll) instead of smooth to avoid
timing issues
- Add waitForStable() after scrollToComment to wait for the DOM
rebuild triggered by setActiveComment
- Use assertCommentHighlightExists (poll-based) instead of a single
toBeVisible check, since the re-render creates new elements
- Increase poll timeout to 15s for the scrollToComment call1 parent d06ff4e commit de197c7
1 file changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
0 commit comments