mirror of
https://github.com/google/blockly.git
synced 2026-06-03 01:40:08 +02:00
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:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user