File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const Toolbar = (props) => {
31
31
( state ) => state . ide
32
32
) ;
33
33
const project = useSelector ( ( state ) => state . project ) ;
34
- const { autorefresh } = useSelector ( ( state ) => state . preferences ) ;
34
+ const autorefresh = useSelector ( ( state ) => state . preferences . autorefresh ) ;
35
35
const dispatch = useDispatch ( ) ;
36
36
37
37
const { t } = useTranslation ( ) ;
@@ -43,7 +43,7 @@ const Toolbar = (props) => {
43
43
function handleKeyPress ( event ) {
44
44
if ( event . key === 'Enter' ) {
45
45
dispatch ( hideEditProjectName ( ) ) ;
46
- projectNameInputRef . current . blur ( ) ;
46
+ projectNameInputRef . current ? .blur ( ) ;
47
47
}
48
48
}
49
49
@@ -101,7 +101,6 @@ const Toolbar = (props) => {
101
101
onClick = { ( ) => {
102
102
props . syncFileContent ( ) ;
103
103
dispatch ( startSketch ( ) ) ;
104
- console . log ( 'play button pressed' ) ;
105
104
} }
106
105
aria-label = { t ( 'Toolbar.PlayOnlyVisualSketchARIA' ) }
107
106
title = { t ( 'Toolbar.PlaySketchARIA' ) }
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ describe('<ToolbarComponent />', () => {
74
74
75
75
expect ( sketchName ) . toBeDisabled ( ) ;
76
76
await waitFor ( ( ) =>
77
- expect ( screen . getByLabelText ( 'New sketch name' ) . disabled ) . toBe ( true )
77
+ // expect(screen.getByLabelText('New sketch name').disabled).toBe(true)
78
+ expect ( screen . getByLabelText ( 'New sketch name' ) ) . toBeDisabled ( )
78
79
) ;
79
80
} ) ;
80
81
You can’t perform that action at this time.
0 commit comments