Revert "chore!: remove angle field from core (#7155)" (#7158)

This reverts commit 0961aca4c8.
This commit is contained in:
Beka Westberg
2023-06-13 15:25:41 -07:00
committed by GitHub
parent 0961aca4c8
commit c6fbb85a69
6 changed files with 1070 additions and 0 deletions

View File

@@ -129,6 +129,27 @@ suite('XML', function () {
workspaceTeardown.call(this, this.workspace);
});
suite('Fields', function () {
test('Angle', function () {
Blockly.defineBlocksWithJsonArray([
{
'type': 'field_angle_test_block',
'message0': '%1',
'args0': [
{
'type': 'field_angle',
'name': 'ANGLE',
'angle': 90,
},
],
},
]);
const block = new Blockly.Block(
this.workspace,
'field_angle_test_block'
);
const resultFieldDom = Blockly.Xml.blockToDom(block).childNodes[0];
assertNonVariableField(resultFieldDom, 'ANGLE', '90');
});
test('Checkbox', function () {
Blockly.defineBlocksWithJsonArray([
{