Files
blockly/tests/compile/test_blocks.js
Christopher Allen 3d7262fed2 fix(tests): Fix & reenable the advanced compilation test (#5781)
* fix(test): Fix advanced compilation test

- Fix loading of blocks in `tests/compile/main.js` caused by
  recent `goog.module`-ification work.
- Fix problem caused by ADVANCED_OPTIMISATIONS renaming the Msg
  property on the fake Blockly object created by the
  translation-loading hack in `blockly.js`.

* chore(build): Reenable advanced compilation test

Fixes #5602.
2021-12-03 10:14:19 -08:00

49 lines
981 B
JavaScript

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Test blocks for advanced compilation.
*/
'use strict';
goog.provide('Blockly.blocks.testBlocks');
goog.require('Blockly');
Blockly.defineBlocksWithJsonArray([
{
'type': 'test_style_hex1',
'message0': 'Block color: Bright purple %1 %2 %3 %4',
'args0': [
{
'type': 'field_input',
'name': 'TEXT',
'text': '#992aff',
},
{
'type': 'field_dropdown',
'name': 'DROPDOWN',
'options': [
['option', 'ONE'],
['option', 'TWO'],
],
},
{
'type': 'field_checkbox',
'name': 'NAME',
'checked': true,
},
{
'type': 'input_value',
'name': 'NAME',
},
],
'previousStatement': null,
'nextStatement': null,
'colour': '#992aff',
}
]);