@@ -13,6 +13,7 @@ import {
1313 sharedTestTeardown ,
1414 workspaceTeardown ,
1515} from './test_helpers/setup_teardown.js' ;
16+ import { CommentIcon } from '../../core/icons/comment_icon.js' ;
1617import { assertVariableValues } from './test_helpers/variables.js' ;
1718
1819suite ( 'XML' , function ( ) {
@@ -442,7 +443,7 @@ suite('XML', function () {
442443 test ( 'Size' , function ( ) {
443444 this . block . setCommentText ( 'test text' ) ;
444445 this . block
445- . getCommentIcon ( )
446+ . getIcon ( CommentIcon . TYPE )
446447 . setBubbleSize ( new Blockly . utils . Size ( 100 , 200 ) ) ;
447448 const xml = Blockly . Xml . blockToDom ( this . block ) ;
448449 const commentXml = xml . firstChild ;
@@ -452,7 +453,7 @@ suite('XML', function () {
452453 } ) ;
453454 test ( 'Pinned True' , function ( ) {
454455 this . block . setCommentText ( 'test text' ) ;
455- this . block . getCommentIcon ( ) . setBubbleVisible ( true ) ;
456+ this . block . getIcon ( CommentIcon . TYPE ) . setBubbleVisible ( true ) ;
456457 const xml = Blockly . Xml . blockToDom ( this . block ) ;
457458 const commentXml = xml . firstChild ;
458459 chai . assert . equal ( commentXml . tagName , 'comment' ) ;
@@ -697,7 +698,7 @@ suite('XML', function () {
697698 this . workspace
698699 ) ;
699700 chai . assert . equal ( block . getCommentText ( ) , 'test text' ) ;
700- chai . assert . isOk ( block . getCommentIcon ( ) ) ;
701+ chai . assert . isOk ( block . getIcon ( CommentIcon . TYPE ) ) ;
701702 } ) ;
702703 test ( 'No Text' , function ( ) {
703704 const block = Blockly . Xml . domToBlock (
@@ -721,10 +722,13 @@ suite('XML', function () {
721722 this . workspace
722723 ) ;
723724 chai . assert . isOk ( block . getIcon ( Blockly . icons . CommentIcon . TYPE ) ) ;
724- chai . assert . deepEqual ( block . getCommentIcon ( ) . getBubbleSize ( ) , {
725- width : 100 ,
726- height : 200 ,
727- } ) ;
725+ chai . assert . deepEqual (
726+ block . getIcon ( CommentIcon . TYPE ) . getBubbleSize ( ) ,
727+ {
728+ width : 100 ,
729+ height : 200 ,
730+ }
731+ ) ;
728732 } ) ;
729733 suite ( 'Pinned' , function ( ) {
730734 test ( 'Pinned True' , function ( ) {
0 commit comments