diff --git a/packages/blockly/core/toolbox/category.ts b/packages/blockly/core/toolbox/category.ts index 72acdee730f..014802a1560 100644 --- a/packages/blockly/core/toolbox/category.ts +++ b/packages/blockly/core/toolbox/category.ts @@ -358,6 +358,15 @@ export class ToolboxCategory return ''; } + /** + * Returns the colour of this category. + * + * @internal + */ + getColour() { + return this.colour_; + } + /** * Sets the colour for the category using the style name and returns the new * colour as a hex string. diff --git a/packages/blockly/tests/mocha/shortcut_items_test.js b/packages/blockly/tests/mocha/shortcut_items_test.js index e074976eb58..4c4865abaa5 100644 --- a/packages/blockly/tests/mocha/shortcut_items_test.js +++ b/packages/blockly/tests/mocha/shortcut_items_test.js @@ -843,7 +843,7 @@ suite('Keyboard Shortcut Items', function () { block.initSvg(); block.render(); Blockly.getFocusManager().focusNode(block); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); test('Icon', function () { @@ -853,7 +853,7 @@ suite('Keyboard Shortcut Items', function () { Blockly.getFocusManager().focusNode( block.getIcon(Blockly.icons.IconType.MUTATOR), ); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); test('Field', function () { @@ -869,7 +869,7 @@ suite('Keyboard Shortcut Items', function () { block.initSvg(); block.render(); Blockly.getFocusManager().focusNode(block.getInput('DO0').connection); - this.assertAnnouncement('Begin stack, if, do, has input'); + this.assertAnnouncement('Begin stack, if, do, First category, has input'); }); });