mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Add wait for xml test case. (#3855)
This commit is contained in:
@@ -840,7 +840,7 @@ suite('XML', function() {
|
||||
});
|
||||
});
|
||||
suite('Headless -> XML -> Rendered -> XML', function() {
|
||||
test('Comment', function() {
|
||||
test('Comment', function(done) {
|
||||
var block = Blockly.Xml.domToBlock(Blockly.Xml.textToDom(
|
||||
'<block type="empty_block"/>'
|
||||
), this.headlessWorkspace);
|
||||
@@ -849,6 +849,11 @@ suite('XML', function() {
|
||||
block.commentModel.pinned = true;
|
||||
|
||||
assertRoundTrip(this.headlessWorkspace, this.renderedWorkspace);
|
||||
|
||||
// domToBlockHeadless_ triggers setTimeout call we need to wait for.
|
||||
setTimeout(function() {
|
||||
done();
|
||||
}, 10);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user