This repository was archived by the owner on Jun 3, 2024. It is now read-only.
File tree 2 files changed +7
-6
lines changed
tests/integration/sliders 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ export default class Slider extends Component {
17
17
? createSliderWithTooltip ( ReactSlider )
18
18
: ReactSlider ;
19
19
this . _computeStyle = computeSliderStyle ( ) ;
20
- this . state = {
21
- value : props . value
22
- } ;
20
+ this . state = { value : props . value } ;
23
21
}
24
22
25
23
UNSAFE_componentWillReceiveProps ( newProps ) {
@@ -35,8 +33,10 @@ export default class Slider extends Component {
35
33
}
36
34
37
35
UNSAFE_componentWillMount ( ) {
38
- this . props . setProps ( { drag_value : this . props . value } ) ;
39
- this . setState ( { value : this . props . value } ) ;
36
+ if ( this . props . value !== null ) {
37
+ this . props . setProps ( { drag_value : this . props . value } ) ;
38
+ this . setState ( { value : this . props . value } ) ;
39
+ }
40
40
}
41
41
42
42
render ( ) {
Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ def update_output(value):
189
189
190
190
dash_dcc .start_server (app )
191
191
dash_dcc .wait_for_text_to_equal ("#out-value" , "You have selected 5" )
192
- assert dash_dcc .find_element ("#out-drag-value" ).text == "You have dragged 5"
192
+ #assert dash_dcc.find_element("#out-drag-value").text == "You have dragged 5"
193
+ dash_dcc .wait_for_text_to_equal ("#out-drag-value" , "You have dragged 5" )
193
194
194
195
slider = dash_dcc .find_element ("#slider" )
195
196
dash_dcc .click_and_hold_at_coord_fractions (slider , 0.25 , 0.25 )
You can’t perform that action at this time.
0 commit comments