Commit f66afd7
committed
fix: Stabilize flaky link visibility toggle test
The test was flaky because it wasn't properly waiting for the canvas
to update after changing the link render mode setting. The setting
change triggers a canvas redraw via setDirty(), but the actual redraw
happens asynchronously.
Changes:
- Add explicit wait for canvas.links_render_mode to update
- Capture initial link render mode to properly verify state changes
- Add double frame wait plus 100ms delay to ensure canvas redraw completes
- Improve wait condition for visible links to handle undefined initial state
- Add timeout protection to prevent test hanging
This ensures the test reliably waits for both the setting change
and the visual update before taking screenshots, eliminating the
race condition that was causing intermittent failures.1 parent fa9f5fb commit f66afd7
1 file changed
+52
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
16 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
17 | 43 | | |
| 44 | + | |
| 45 | + | |
18 | 46 | | |
19 | 47 | | |
20 | 48 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 49 | | |
25 | | - | |
| 50 | + | |
26 | 51 | | |
27 | 52 | | |
| 53 | + | |
28 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
29 | 74 | | |
| 75 | + | |
| 76 | + | |
30 | 77 | | |
31 | 78 | | |
32 | 79 | | |
33 | 80 | | |
34 | | - | |
| 81 | + | |
35 | 82 | | |
36 | 83 | | |
37 | 84 | | |
| |||
0 commit comments