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) => {
3131 ( state ) => state . ide
3232 ) ;
3333 const project = useSelector ( ( state ) => state . project ) ;
34- const { autorefresh } = useSelector ( ( state ) => state . preferences ) ;
34+ const autorefresh = useSelector ( ( state ) => state . preferences . autorefresh ) ;
3535 const dispatch = useDispatch ( ) ;
3636
3737 const { t } = useTranslation ( ) ;
@@ -43,7 +43,7 @@ const Toolbar = (props) => {
4343 function handleKeyPress ( event ) {
4444 if ( event . key === 'Enter' ) {
4545 dispatch ( hideEditProjectName ( ) ) ;
46- projectNameInputRef . current . blur ( ) ;
46+ projectNameInputRef . current ? .blur ( ) ;
4747 }
4848 }
4949
@@ -101,7 +101,6 @@ const Toolbar = (props) => {
101101 onClick = { ( ) => {
102102 props . syncFileContent ( ) ;
103103 dispatch ( startSketch ( ) ) ;
104- console . log ( 'play button pressed' ) ;
105104 } }
106105 aria-label = { t ( 'Toolbar.PlayOnlyVisualSketchARIA' ) }
107106 title = { t ( 'Toolbar.PlaySketchARIA' ) }
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ describe('<ToolbarComponent />', () => {
7474
7575 expect ( sketchName ) . toBeDisabled ( ) ;
7676 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 ( )
7879 ) ;
7980 } ) ;
8081
You can’t perform that action at this time.
0 commit comments