Skip to content

Commit 2a9b5bc

Browse files
committed
chore: add empty workspace scenario
1 parent aa8ea7f commit 2a9b5bc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
move value test blocks
119119
</option>
120120
<option value="comments">comments</option>
121+
<option value="emptyWorkspace">empty workspace</option>
121122
</select>
122123
</div>
123124
<div>

test/loadTestBlocks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,12 @@ const comments = {
12061206
},
12071207
};
12081208

1209+
const emptyWorkspace = {
1210+
'blocks': {
1211+
'blocks': [],
1212+
},
1213+
};
1214+
12091215
/**
12101216
* Loads saved state from local storage into the given workspace.
12111217
* @param {Blockly.Workspace} workspace Blockly workspace to load into.
@@ -1222,6 +1228,7 @@ export const load = function (workspace, scenarioString) {
12221228
navigationTestBlocks,
12231229
simpleCircle,
12241230
'sun': sunnyDay,
1231+
emptyWorkspace,
12251232
};
12261233
// Don't emit events during loading.
12271234
Blockly.Events.disable();

0 commit comments

Comments
 (0)