@@ -72,15 +72,15 @@ def test_scrol001_fixed_alignment(test, fixed_rows, fixed_columns, ops):
72
72
"return parseFloat(getComputedStyle(document.querySelector('#table .cell-0-0')).width) || 0;"
73
73
)
74
74
75
- assert - get_margin (test ) == fixed_width
75
+ assert - get_margin (test ) == pytest . approx ( fixed_width , abs = 1 )
76
76
77
77
scroll_by (test , 200 )
78
78
79
- wait .until (lambda : - get_margin (test ) == fixed_width + 200 , 3 )
79
+ wait .until (lambda : - get_margin (test ) == pytest . approx ( fixed_width + 200 , abs = 1 ) , 3 )
80
80
81
81
scroll_by (test , - 200 )
82
82
83
- wait .until (lambda : - get_margin (test ) == fixed_width , 3 )
83
+ wait .until (lambda : - get_margin (test ) == pytest . approx ( fixed_width , abs = 1 ) , 3 )
84
84
assert test .get_log_errors () == []
85
85
86
86
@@ -121,12 +121,12 @@ def test_scrol002_edit_navigate(test, fixed_rows, fixed_columns, ops):
121
121
test .send_keys ("abc" + Keys .ENTER )
122
122
123
123
wait .until (lambda : target .cell (1 , 3 ).is_selected (), 3 )
124
- wait .until (lambda : - get_margin (test ) == fixed_width + get_scroll (test ), 3 )
124
+ wait .until (lambda : - get_margin (test ) == pytest . approx ( fixed_width + get_scroll (test ), abs = 1 ), 3 )
125
125
126
126
# alignment is ok after navigating
127
127
test .send_keys (Keys .ARROW_DOWN )
128
128
test .send_keys (Keys .ARROW_RIGHT )
129
129
130
130
wait .until (lambda : target .cell (2 , 4 ).is_selected (), 3 )
131
- wait .until (lambda : - get_margin (test ) == fixed_width + get_scroll (test ), 3 )
131
+ wait .until (lambda : - get_margin (test ) == pytest . approx ( fixed_width + get_scroll (test ), abs = 1 ), 3 )
132
132
assert test .get_log_errors () == []
0 commit comments