Skip to content

Commit 25b1b3f

Browse files
committed
Fixed how tests work with new scheme
1 parent 5e3533f commit 25b1b3f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/editor/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class Editor {
169169
if (toolbox != this.toolbox) {
170170
this.toolbox = toolbox;
171171
this.blocklyWorkspace.updateToolbox(toolbox);
172-
//testAllBlocksInToolbox();
172+
// testAllBlocksInToolbox(toolbox);
173173
}
174174
}
175175

src/toolbox/toolbox_tests.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import * as toolboxItems from './items';
2525

2626
// Tests
2727

28-
export function testAllBlocksInToolbox(toolbox : toolboxItems.Category) {
29-
const contents = toolbox.contents;
28+
export function testAllBlocksInToolbox(toolbox : Blockly.utils.toolbox.ToolboxDefinition) {
29+
const contents = (toolbox as toolboxItems.Category).contents;
3030
alert('Press OK to run tests on all blocks from the toolbox.');
3131
const toolboxTestData = new ToolboxTestData(contents, () => {
3232
alert('Completed tests on all blocks in the toolbox. See console for any errors.');
@@ -55,7 +55,7 @@ class ToolboxTestData {
5555
contents.forEach((item) => {
5656
switch (item.kind) {
5757
default:
58-
console.log('Error - item.kind is ' + item.kind + '. It must be block, category, or sep.');
58+
console.log('Error - item.kind is ' + item.kind + '. It must be block, category, label, or sep.');
5959
break;
6060
case 'block':
6161
const block = item as toolboxItems.Block;
@@ -68,6 +68,7 @@ class ToolboxTestData {
6868
}
6969
break;
7070
case 'sep':
71+
case 'label':
7172
break;
7273
}
7374
});

0 commit comments

Comments
 (0)