fix: Fix resolution of parent toolbox category for block descriptions (#9891)

* fix: Fix resolution of parent toolbox category for block descriptions

* fix: Fix tests
This commit is contained in:
Aaron Dodson
2026-05-21 08:10:39 -07:00
committed by GitHub
parent 86d634cc7f
commit 372af5e7b0
2 changed files with 12 additions and 3 deletions
@@ -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.
@@ -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');
});
});