Skip to content

Commit 341eb3c

Browse files
committed
suggested changes
1 parent d9d89a5 commit 341eb3c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/modules/IDE/components/Header/Toolbar.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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')}

client/modules/IDE/components/Header/Toolbar.unit.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)