Skip to content

Commit f0b4547

Browse files
committed
Add test
1 parent dd52604 commit f0b4547

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/components/Menus/Sidebar/Sidebar.test.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,32 @@ describe("When plugins are provided", () => {
411411
});
412412
});
413413
});
414+
415+
describe("When the project type is code_editor_scratch", () => {
416+
beforeEach(() => {
417+
const mockStore = configureStore([]);
418+
const initialState = {
419+
editor: {
420+
project: {
421+
components: [],
422+
image_list: [],
423+
project_type: "code_editor_scratch",
424+
},
425+
instructionsEditable: false,
426+
},
427+
instructions: {},
428+
};
429+
const store = mockStore(initialState);
430+
render(
431+
<Provider store={store}>
432+
<div id="app">
433+
<Sidebar options={options} />
434+
</div>
435+
</Provider>,
436+
);
437+
});
438+
439+
test("Does not show file icon", () => {
440+
expect(screen.queryByTitle("sidebar.file")).not.toBeInTheDocument();
441+
});
442+
});

0 commit comments

Comments
 (0)