mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
refactor: Remove more uses of AnyDuringMigration (#6863)
* refactor: Remove uses of AnyDuringMigration from xml.ts. * refactor: Remove uses of AnyDuringMigration from block_svg.ts. * refactor: Remove uses of AnyDuringMigration from theme_manager.ts. * refactor: Remove uses of AnyDuringMigration from names.ts. * refactor: Remove uses of AnyDuringMigration from field_angle.ts. * refactor: Remove some uses of AnyDuringMigration from block.ts. * refactor: Make safename construction more readable. * fix: Use a default size for block comments. * fix: Clarify test of shadow block disposal. * fix: Update assert in workspace_svg_test to use isDeadOrDying().
This commit is contained in:
@@ -70,7 +70,7 @@ suite('WorkspaceSvg', function() {
|
||||
'Block 2 position y');
|
||||
});
|
||||
|
||||
test('Replacing shadow disposes svg', function() {
|
||||
test('Replacing shadow disposes of old shadow', function() {
|
||||
const dom = Blockly.utils.xml.textToDom(
|
||||
'<xml xmlns="https://developers.google.com/blockly/xml">' +
|
||||
'<block type="test_val_in">' +
|
||||
@@ -84,7 +84,7 @@ suite('WorkspaceSvg', function() {
|
||||
const blocks = this.workspace.getAllBlocks(false);
|
||||
chai.assert.equal(blocks.length, 2, 'Block count');
|
||||
const shadowBlock = blocks[1];
|
||||
chai.assert.exists(shadowBlock.getSvgRoot());
|
||||
chai.assert.equal(false, shadowBlock.isDeadOrDying());
|
||||
|
||||
const block = this.workspace.newBlock('simple_test_block');
|
||||
block.initSvg();
|
||||
@@ -92,8 +92,8 @@ suite('WorkspaceSvg', function() {
|
||||
const inputConnection =
|
||||
this.workspace.getTopBlocks()[0].getInput('NAME').connection;
|
||||
inputConnection.connect(block.outputConnection);
|
||||
chai.assert.exists(block.getSvgRoot());
|
||||
chai.assert.notExists(shadowBlock.getSvgRoot());
|
||||
chai.assert.equal(false, block.isDeadOrDying());
|
||||
chai.assert.equal(true, shadowBlock.isDeadOrDying());
|
||||
});
|
||||
|
||||
suite('updateToolbox', function() {
|
||||
|
||||
Reference in New Issue
Block a user