Commit Graph

237 Commits

Author SHA1 Message Date
picklesrus
063b5d880c Add a test block with a dropdown containing both text and images (#1748) 2018-03-29 13:15:20 -07:00
Andrew n marshall
abb0047e41 Adding warnings to not include <varaibles> (#1645)
...in generator test workspace files.
2018-02-21 13:56:26 -08:00
Andrew n marshall
2358fe6fd5 Adding test cases for Unicode in blocks. (#1646)
Adds test blocks to demonstrate capabilities. Stopped short of adding BiDi override characters.
I added to the toolbox category "Images". It isn't really images, but it didn't seem worth making a separate category at this stage.
2018-02-21 13:53:44 -08:00
Andrew n marshall
8fcdbf0eae Adding new playground test category "Drag" (#1643)
Edge cases to test involving dragging blocks from the toolbox.
2018-02-20 14:12:44 -08:00
Andrew n marshall
4092a644d5 Adding a iframe wrapper around the playground. (#1634) 2018-02-16 16:48:11 -08:00
Andrew n marshall
d9a7f84b98 Adding test blocks into the playground (#1629)
The new toolbox option includes a number of test blocks
largely pulled from the android project, testing various
configurations and edge cases.
2018-02-16 11:14:40 -08:00
Mark Gibson
54f0e06e21 Customising field types using a register of fields #1584 (#1594)
Implement #1584 - Fields now registered by their JSON type name, allowing new custom fields and overriding of the standard fields. Replaces the manual switch statement for loading fields from JSON block definitions.
2018-02-14 10:14:59 -08:00
Rachel Fenichel
2bd606c5e7 Fix comments 2018-02-13 10:41:57 -08:00
Rachel Fenichel
3a8fc92143 Indentation 2018-02-12 17:14:26 -08:00
Rachel Fenichel
744e70e4d2 Split playground toolbox XML into typed and untyped examples. 2018-02-12 17:12:52 -08:00
Mark Gibson
28d3d68b62 Fix fromJson_ to fromJson in tests 2018-02-07 18:30:22 +00:00
Mark Gibson
d40ef474ae See issue #1486 - adds fromJson_ fn to every Blockly.Field, removing Block.newField*FromJson_ helpers 2018-02-07 12:22:26 +00:00
Rachel Fenichel
6d96e4003b Merge pull request #1576 from rachel-fenichel/bugfix/1574
Add generators for dynamic variable blocks.
2018-01-29 16:20:28 -08:00
Rachel Fenichel
4a059b23f8 Add tests 2018-01-29 16:04:47 -08:00
Rachel Fenichel
4c130aab83 Rename createVarBlock to createMockVarBlock, and pass in the workspace as a parameter 2018-01-29 15:15:32 -08:00
Rachel Fenichel
bce24fef6b Add generators for dynamic variable blocks. 2018-01-26 17:10:45 -08:00
Rachel Fenichel
7314bdfb3a Fix #1499 and add some validation 2018-01-17 16:54:12 -08:00
Rachel Fenichel
5d6d7519cd Remove some TODOs; add a variable-referencing block to the simple playground flyout 2018-01-08 14:14:26 -08:00
Rachel Fenichel
0a0b6f3848 Add error; python and php tests pass. 2017-12-20 16:28:14 -08:00
Rachel Fenichel
fced496d28 Lua generator tests pass with new variables 2017-12-20 15:23:05 -08:00
Rachel Fenichel
3d0567fe46 JS and Dart generator tests pass 2017-12-20 15:14:37 -08:00
Rachel Fenichel
4cd0b36944 Fix event ordering for variables created from XML implicitly 2017-12-19 14:25:52 -08:00
Rachel Fenichel
6218750207 Fix events for variable fields on new blocks; fix tests 2017-12-19 11:28:23 -08:00
Rachel Fenichel
df1d5ba525 fix tests 2017-12-15 14:07:17 -08:00
Rachel Fenichel
be4054b593 Tests 2017-12-13 11:50:08 -08:00
Rachel Fenichel
399f1a5c11 Tests 2017-12-13 11:50:08 -08:00
Rachel Fenichel
24672bcbb2 Remove ws.updateVariableStore and tests, and ws.getVariableUses 2017-12-13 11:50:08 -08:00
Rachel Fenichel
61db23c78a Get rid of workspace.deleteVariable 2017-12-13 11:50:08 -08:00
Rachel Fenichel
523a10413b All tests pass 2017-12-13 11:50:07 -08:00
Rachel Fenichel
19939dc16a All but XML tests now pass 2017-12-13 11:50:07 -08:00
Rachel Fenichel
3728cfed45 Update tests in workspace_test. Get rid of renameVariable 2017-12-13 11:50:07 -08:00
Rachel Fenichel
c55b6afc6f Fix tests in field_variable_test.js 2017-12-13 11:50:07 -08:00
Rachel Fenichel
779be46a92 Allow variables of different types to share the same name. 2017-12-13 11:50:07 -08:00
Neil Fraser
bc1a5baa48 Fixes to Generator tests (#1510)
* Remove unneeded report variable from generator tests.
* Fix missing message parameter in unittest_fail.  This was a compile error in Dart.
* Fix indentation in PHP.
* Equality helper function not needed in PHP.
2017-12-12 17:38:38 -08:00
Rachel Fenichel
0cb5dfc437 Merge pull request #1492 from Kenny2github/patch-1
Remove "fake some drags!"
2017-12-11 17:12:11 -08:00
Tianwei Du
492462e1d4 Develop (#1481)
* variables_dynamic

* make test , and i18n

* Issue #1470

* Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_MUTATION
to make sure setCheck before event trigger

* Update built files from develop.

* fix copyright ,quotes , comments ,  and optimize some flow.

* quotes,change UI , change category custom name

* single setter , remove mutator , colour typo , typed variables create button message

* undo the indent edits.
2017-12-08 08:53:24 -08:00
Ken
c53dec9786 Remove "fake some drags!"
Removed the button, the "fakeDrag" and "fakeManyDrags" and "fakeDragWrapper", and the "fakeDragStack" list.
2017-12-02 11:47:46 +08:00
Andrew n marshall
aa78a8b566 Better error reporting when the test XML fails to load. (#1443) 2017-11-14 13:36:38 -08:00
Rachel Fenichel
66586bf622 Add a test for case-sensitivity in the variable names, ids, etc. in the flyout 2017-11-03 16:03:32 -07:00
Rachel Fenichel
30716fbd78 switch to variabletype everywhere 2017-11-03 16:03:32 -07:00
Evan W. Patton
67e192e208 Fix logic bugs related to e1e9427 (#1398)
This commit adds a fallback when attempting to merge events that
collide on a hash but do not actually merge. Previously, the latter
event would be dropped.

This also fixes a minor UX problem where moving the isNull check into
the merging loop resulted in extra events in the undo queue that
served no purpose and required multiple undo operations without visual
feedback.

Fixes #1373
2017-10-27 16:04:17 -07:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Andrew n marshall
f992ea0f9c Fix #1369: resource loading order constraints, interpolation tokens in message expansion (PR #1383)
This fixes race condition in #1369 by using message references instead of explicit string lookups. This required fixing a bug the token interpolation parser that was breaking on the inner '"%1"' for these tooltips.
2017-10-24 13:02:14 -07:00
Neil Fraser
82705923cb Convert compile demo into a unit test. (#1360)
* Intentionally break Travis.

* Alphabetize tests, remove orphaned test, and add fail to test that's running.

* Unbreak test, disable OS X, move scripts, list compiler directory.

* Test Java, break test.

* Unbreak test, call compile script.

* Compile main_compressed.js

* Run test command using bash.

* Fix path.

* Exclude node modules.

* Be more specific about JS files to compile.

* Test failure.

* Restore OSX, undo Blockly failure, remove compilation demo, add compilation test.

* Delete manual test files.

* Ignore downloaded/generated files.

* Whitespace cleanup.
2017-10-12 14:54:57 -07:00
Rachel Fenichel
c381808120 Tests for widget div math. (#1338)
* New widget div functions, used in context menu code

* Make all widget div positioning functions use the same argument order

* Use new widget div functions for fields

* share code for measuring menu size

* Get rid of positionMenu

* Update copyright date

* Rebuild blockly_uncompressed because there's a new require in town

* Test for widget div math
2017-09-22 16:10:47 -07:00
picklesrus
5518873389 Revert "Remove all all instances calling setValue on variable fields with the name instead of the id" (#1296)
* Revert "Create WorkspaceViewport class (#1291)"

This reverts commit 6c00d77c9e.

* Revert "Remove all all instances calling setValue with name. (#1254)"

This reverts commit 8e8b6b27af.
2017-08-28 16:55:44 -07:00
marisaleung
8e8b6b27af Remove all all instances calling setValue with name. (#1254) 2017-08-24 14:34:01 -07:00
Evan W. Patton
e1e94271c4 Implement Blockly.Events.filter in linear time (#1205)
* Implement Blockly.Events.filter in linear time

For large App Inventor projects (order 1k+ blocks, 100+ top-level
blocks), the O(n^2) behavior of Blockly.Event.filter was causing
performance issues when rearranging blocks or pasting from the
backpack. This commit provides a linear merge implementation using a
key that uniquely identifies a block so that multiple events targeting
the same block are merged. This change benefits from O(1) amortized
lookup using an object as a key-value store.

* Add event filter unit tests and fix logic bugs

* Update Blockly.Events.filter unit tests
2017-08-18 14:18:47 -07:00
marisaleung
f3fa660c41 Merge pull request #1236 from marisaleung/develop_changeWorkspaceToPlaygroundWorkspace
Change workspace name to playgroundWorkspace.
2017-08-02 17:16:26 -07:00