Skip to content

Commit fe13441

Browse files
committed
Fix logic issue found in tests
1 parent 492e70f commit fe13441

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

components/dash-core-components/src/fragments/RangeSlider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default function RangeSlider(props: RangeSliderProps) {
152152
);
153153

154154
const maxDecimalChars = Math.min(
155-
String(stepValue).split('.')[1]?.length + 1 ?? 0,
155+
(String(stepValue).split('.')[1]?.length ?? -1) + 1,
156156
3
157157
);
158158

components/dash-core-components/tests/integration/misc/test_persistence.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def make_output(*args):
118118
]
119119

120120
dash_dcc.start_server(app)
121+
dash_dcc.driver.set_window_size(1024, 768)
121122
dash_dcc.wait_for_text_to_equal("#settings", json.dumps(initial_settings))
122123

123124
dash_dcc.find_element("#checklist label:last-child input").click() # 🚀

components/dash-core-components/tests/integration/sliders/test_sliders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def update_output(rng):
6060
dash_dcc.wait_for_text_to_equal("#out", "You have selected 5-15")
6161

6262
slider = dash_dcc.find_element("#rangeslider")
63-
dash_dcc.click_at_coord_fractions(slider, 0.15, 0.25)
63+
dash_dcc.click_at_coord_fractions(slider, 0.2, 0.25)
6464
dash_dcc.wait_for_text_to_equal("#out", "You have selected 3-15")
65-
dash_dcc.click_at_coord_fractions(slider, 0.5, 0.25)
65+
dash_dcc.click_at_coord_fractions(slider, 0.51, 0.25)
6666
dash_dcc.wait_for_text_to_equal("#out", "You have selected 3-10")
6767

6868
assert dash_dcc.get_logs() == []

0 commit comments

Comments
 (0)