Commit Graph

219 Commits

Author SHA1 Message Date
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
marisaleung
103c10eddb Change workspace name to playgroundWorkspace. 2017-08-02 17:03:22 -07:00
Tony Lian
bfa45f136c Change the Lua interpreter (#1246)
Change the Lua interpreter to another one with version 5.3 so that it
would support goto statement which Blockly uses currently
2017-08-01 14:29:55 -07:00
marisaleung
234c53157f Fix Blockly.Procedures.isNameUsed return values.
Add tests for Procedures.isNameUsed() so this bug never happens again.
2017-07-28 12:02:14 -07:00
marisaleung
733d869f8e Add VariableType checks. 2017-07-20 16:47:37 -07:00
marisaleung
15d47840b1 Fire field variable change event with variable value, not name. 2017-06-29 11:24:25 -07:00
marisaleung
3c8e0ebbeb Dropdown Create does not create a missing variable twice. 2017-06-27 16:51:19 -07:00
marisaleung
4a2c95fd1b Revamping mostly gesture tests. 2017-06-22 16:56:28 -07:00
marisaleung
5b1a0ae284 Test Delete Variable Twice. 2017-06-09 16:32:16 -07:00
marisaleung
d852a2b116 In DropdownCreate check for Msg.DELETE_VARIABLE. 2017-06-09 16:22:25 -07:00
marisaleung
c58553b7ba Create utility function for checking variable values. 2017-06-09 15:24:31 -07:00
marisaleung
833c2d0c40 Fire VAR events and test. 2017-06-09 14:42:14 -07:00
marisaleung
e9a480c51f Add VAR events. 2017-06-08 15:15:17 -07:00
marisaleung
0040ff636c Field Variable setValue() looks up variable. 2017-06-06 15:29:28 -07:00
marisaleung
ccf3ad1473 Add BLOCK events and constructor tests. 2017-06-01 12:38:38 -07:00
marisaleung
cd0487e816 Clean up and create test utilities file. 2017-06-01 10:36:01 -07:00
marisaleung
a6f85cec53 Appease eslint: semicolons and such. 2017-05-25 13:44:06 -07:00
marisaleung
dc06872a37 Deserialization variables at top. 2017-05-24 15:29:46 -07:00
marisaleung
ce4a84b3cf Include variables at top of serialization. 2017-05-24 10:53:44 -07:00