Skip to content

Commit 03c8287

Browse files
committed
test that startSketch must have been called when play button is clicked
1 parent dd433b7 commit 03c8287

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,13 @@ describe('<ToolbarComponent />', () => {
9090
await waitFor(() => expect(props.setProjectName).not.toHaveBeenCalled());
9191
await waitFor(() => expect(props.saveProject).not.toHaveBeenCalled());
9292
});
93+
94+
it('sketch is started when play button is clicked', async () => {
95+
const props = renderComponent();
96+
const playButton = screen.getByLabelText('Play only visual sketch');
97+
98+
fireEvent.click(playButton);
99+
100+
await waitFor(() => expect(props.startSketch).toHaveBeenCalled());
101+
});
93102
});

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"@babel/core": "^7.8.4",
142142
"@babel/polyfill": "^7.8.3",
143143
"@babel/register": "^7.8.3",
144-
"@emmetio/codemirror-plugin": "^1.2.1",
144+
"@emmetio/codemirror-plugin": "^1.2.3",
145145
"archiver": "^1.1.0",
146146
"async": "^2.6.3",
147147
"axios": "^0.21.1",

0 commit comments

Comments
 (0)