fix: fieldDropdown.getText works in node (#9048)

* fix: dropdown getText works in node

* chore: comment
This commit is contained in:
Maribeth Moffatt
2025-05-14 12:22:09 -07:00
committed by GitHub
parent 7a7fad45c1
commit 523dca92bd
2 changed files with 27 additions and 3 deletions

View File

@@ -181,4 +181,11 @@ suite('Test Node.js', function () {
assert.deepEqual(jsonAfter, json);
});
test('Dropdown getText works with no HTMLElement defined', function () {
const field = new Blockly.FieldDropdown([
['firstOption', '1'],
['secondOption', '2'],
]);
assert.equal(field.getText(), 'firstOption');
});
});