Beka Westberg
410365f4a1
feat: add support for defining toolboxes using pure json ( #5392 )
...
* feat: add recycling to core
* feat: add support for json block definitions in flyout
* tests: reorganize tests
* tests: add tests for generating contents
* Fixup reycling
* tests: add tests for recycling
* fix: types
* fix: lint
* fix: PR comments
* fix: creating blocks from flyout
* test: add test block to playground
* fix: types
* feat: add support for enabled
2021-09-20 13:08:35 -07:00
Beka Westberg
4f890d73a5
fix: redo disconnect from shadow bug
2021-09-20 13:08:35 -07:00
Beka Westberg
486123e4ff
fix: insertion markers and change events to work with JSO hooks ( #5378 )
...
* fix: add tests for fixing change events
* fix: change events and insertion markers
* fix: build:
* fix: remove duplicate code
* fix: requires
2021-09-20 13:08:35 -07:00
Beka Westberg
9138bca93c
feat: add initialization of blocks and event firing ( #5166 )
...
* Change playground to use JSO system
* Add tests for initialization and events
* Add initialization of blocks
* PR Comments
2021-09-20 13:08:35 -07:00
Beka Westberg
ceeda333dc
Add serialization of basic block attributes to JSOs ( #5053 )
...
* Add basic attribute tests
* Add basic block serialization
* Add more attribute tests
* Change save to use options dictionary
* Add obeying save options
* Add test for data attribute
* Add saving data tag
* Move to ES6 syntax
* Fixup move to es6 syntax
* Declare module
* Format and lint
* Add docs
* Add returning null on insertion markers
* Fixup for move to module
* Switch to other function declarations
* Cleanup for finalized style
* Fix lint and types
* Export State def
* Switch disabled=true to enabled=false
2021-09-20 13:08:35 -07:00
Beka Westberg
319423959b
Adds a serializer test suite - project cereal ( #5034 )
...
* Setup basic architecture for tests
* Attribute tests
* Easy field tests added
* Work on tests
* Work on tests
* Work on tests
* Add mutation tests
* Fixup ID tests
* Add more mutator tests
* Fixup lint and typos
* Uncomment tests
* Use test helpers
* Small PR comments
* Use test helpers for setup and teardown
* Add TODOs and fixup types
* Fix types
* Actually fix types
2021-09-20 13:08:35 -07:00
alschmiedt
5b1586ee1b
test: update mocha tests to use goog_module ( #5440 )
...
* Use goog.module in mocha tests
* Fix compiler warnings
* Make test helpers a module
* Name test modules Blockly.test.*
This is to be more consistent with how non-test modules are named.
Also remove top-level goog.require of TestHelpers (now
Blockly.test.helpers) since requiring a side-effect-less module does
nothing.
* Convert block_test.js and comment_test.js to goog.module syntax
* Address PR comments
* Goog modulify tests
* Goog modulify toolbox helpers
* Fixes imports and moves common tests from workspace_test.js to a helper file.
* Update test deps after rebase
Co-authored-by: Christopher Allen <cpcallen+git@google.com >
2021-09-16 13:00:38 -07:00
alschmiedt
57ac0ae33b
test: Changes mocha tests to use node_modules ( #5467 )
2021-09-15 08:23:42 -07:00
Beka Westberg
75f118b4f9
Refactor interpolate_ into multiple functions & remove direct new Field call ( #4585 )
...
* Refactor interpolation
* Added docs
* Add tests
* Add test for dummy input after field not prefixed with field_
* Fix typings
* Pr comments
2021-01-22 12:44:50 -08:00
alschmiedt
a3adc42e8a
Remove keyboard navigation from core ( #4593 )
2021-01-19 11:50:51 -08:00
Monica Kozbial
dd0d5aee53
Adding procedure tests and handling procedures instantiated without name ( #4428 )
...
* Expand procedure tests and fix bug with default ids
* Add tests
* Remove xml_procedures_test.js and add non-overlapping test cases into procedures_test.js
2020-11-06 11:48:48 -08:00
alschmiedt
f1498e7f07
Keyboard shortcuts ( #4421 )
...
* Adds shortcut registry and removes action and key map (#4398 )
* Adds Shortcut tests and refactored navigation tests (#4412 )
* Adds shortcut items (#4408 )
* Add shortcuts for navigation (#4409 )
* Add final keyboard shortcut cleanup (#4413 )
2020-11-02 13:30:05 -08:00
alschmiedt
7eb9c498e6
Test Blockly.onKeyDown method ( #4373 )
2020-10-16 11:26:32 -07:00
Monica Kozbial
6ec002e3d4
Adding tests for multiline block ( #4317 )
...
* Adding tests for multiline input
2020-09-30 15:20:35 -07:00
alschmiedt
3d698f4bcc
Block factory fix ( #4327 )
2020-09-28 10:42:45 -07:00
Beka Westberg
47cc3b97b0
Add getTooltip ( #4254 )
...
* Add getTooltip
* Add tests
* Fix typings?
* Fix typings?
* PR Comments
2020-09-10 08:57:05 -07:00
alschmiedt
d01169fa79
Toolbox Rewrite ( #4223 )
...
Rewrite the toolbox in order to get rid of old closure code and make it easier to extend.
Co-authored-by: Maribeth Bottorff <maribethb@google.com >
2020-09-02 08:13:07 -07:00
Monica Kozbial
7dd57adf83
Give Blockly div in tests a height. ( #4207 )
2020-08-20 19:02:19 -07:00
Monica Kozbial
f8f98831af
Add zoom controls tests. ( #4159 )
2020-08-12 18:39:35 -07:00
Monica Kozbial
b0b3c67b90
Support dispatching pointer events in click tests ( #4154 )
...
* Add helpers for simulating mouse click.
* Update field and workspace click tests.
2020-08-11 11:17:33 -07:00
Maribeth Bottorff
9568d3f2cc
Add tests for contextmenu_items ( #4118 )
...
Add tests for context menu items
2020-08-10 11:46:10 -07:00
Rachel Fenichel
3322834a9b
Add deprecation warnings and tests
2020-07-16 17:40:13 -06:00
Rachel Fenichel
bb8348befd
Move to a single canConnect function, and update tests
2020-07-16 17:40:12 -06:00
Monica Kozbial
4ac4332f5e
Update logic for field default values. ( #3953 )
...
* Update logic for field default values.
* Fix bugs
* Use contant for default value.
* Fix FieldColour
* Update field number tests.
* Update field angle test.
* Minor update.
* Update field checkbox test.
* Undo enabling logging
* Remove only.
* Update field colour test.
* Update invalid test cases for field colour
* Update field label tests
* Update field textinput test.
* Minor cleanup
* Make lint happy.
2020-06-12 15:18:28 -07:00
alschmiedt
61054ee55a
Registry ( #3914 )
...
Create a global registry that fields, renderers and future objects can use
2020-05-26 11:21:42 -07:00
Sam El-Husseini
a5a3b045d3
Use the Blockly AST for block toString ( #3895 )
...
* Use the AST tree to populate block toString, add paranthesis around Number and Boolean connections
2020-05-14 17:06:35 -07:00
alschmiedt
d0e91a15a2
Toolbox definition ( #3891 )
...
* Add support for creating a toolbox with JSON
2020-05-13 08:16:53 -07:00
Sam El-Husseini
888e348c69
Clean out the date field ( #3876 )
2020-05-06 09:42:24 -07:00
Beka Westberg
65bb33635d
Add ignoring insertion markers in code gen
2020-05-02 07:37:58 -07:00
Monica Kozbial
e606b872c2
Converting logic_ternary block tests to mocha ( #3868 )
...
* Convert logic_ternary block tests to mocha.
2020-04-29 11:30:23 -07:00
Monica Kozbial
e516a08430
Workspace svg tests ( #3857 )
...
* Converting workspace svg tests to mocha and calling workspace tests.
* Removing jsunit style test for workspace_svg.
* Fix eslint error.
2020-04-27 16:32:52 -07:00
Monica Kozbial
b3d4932d49
Enabling workspace comments test. ( #3856 )
2020-04-24 15:07:44 -07:00
Monica Kozbial
2f33a37fa4
Convert workspace comment tests to mocha. ( #3850 )
2020-04-22 14:49:42 -07:00
alschmiedt
10444d76ec
Toolbox tests ( #3846 )
...
* Add tests for toolbox
2020-04-22 08:47:08 -07:00
Monica Kozbial
b934fdc93c
Converting generator tests to mocha. ( #3845 )
2020-04-21 17:38:26 -07:00
Monica Kozbial
61c60019fd
Converting widget div tests to mocha. ( #3844 )
2020-04-21 14:03:32 -07:00
Monica Kozbial
17eade1017
Partial conversion of workspace tests to mocha. ( #3838 )
2020-04-17 16:31:12 -07:00
Monica Kozbial
a74cd0898c
Converting variable map tests to mocha. ( #3827 )
...
* Converting variable map tests to mocha.
* Removing TODO updating chai syntax.
2020-04-16 17:47:17 -07:00
Monica Kozbial
e838027629
Convert variable model tests to mocha. ( #3829 )
...
* Convert variable model tests to mocha.
* Delete old jsunit test.
* Updating to use chai syntax.
2020-04-16 17:39:38 -07:00
Monica Kozbial
9c400f2bf0
Converting variable tests to mocha. ( #3828 )
2020-04-16 14:18:12 -07:00
Monica Kozbial
d61f3c6f38
Converting extensions_test to mocha. ( #3820 )
...
* Converting extensions_test to mocha.
* Add spacing between test cases.
* Fix cleanup for block type.
* Add cleanup for event state.
2020-04-15 15:55:49 -07:00
Monica Kozbial
c740d2781c
Converting json junit test to mocha. ( #3809 )
...
* Converting json_test to mocha.
* Adding exceptions to mocha eslint config.
* Address PR comments.
2020-04-14 18:17:34 -07:00
Beka Westberg
1baf7d1dcf
Added a bunch of connection related tests.
2019-09-27 15:56:29 -07:00
Beka Westberg
9e5df6216a
Fixed comment ownership. ( #2923 )
...
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it.
* Reorganized the setVisible function.
* Changed how xml.js serializes and deserializes comments.
2019-09-20 13:16:07 -07:00
Beka Westberg
093467aed1
Added More Procedure Unit Tests ( #2630 )
...
* Added more procedure unit tests.
* Cleanup from rebase.
* Cleanup.
2019-09-18 16:14:06 -07:00
Beka Westberg
e05e26ab45
Fixed insertFieldAt ( #2939 )
...
* Fixed insertFieldAt.
* Updated tests to reflect upcomming config changes.
2019-09-16 11:11:18 -07:00
Sam El-Husseini
705730df0c
Convert connection_db jsunit tests to mocha ( #2872 )
...
* Convert connection_db jsunit tests to mocha
2019-08-21 13:35:20 -07:00
Sam El-Husseini
f15f9ebd13
Convert metrics jsunit test to mocha ( #2871 )
...
* Convert metrics jsunit test to mocha
2019-08-20 20:15:39 -07:00
Sam El-Husseini
eada00a692
Convert theme jsunit test to mocha ( #2874 )
2019-08-20 20:14:38 -07:00
Sam El-Husseini
3d9b8267b5
Convert names_test from jsunit to mocha. ( #2873 )
2019-08-20 13:17:40 -07:00