Eric Rosenbaum
2b32b265a1
Merge pull request #2071 from ericrosenbaum/bugfix/stub-timer-for-test
...
Stub timer to fix flaky test
2019-04-18 11:29:36 -04:00
Karishma Chadha
23136ad9c3
Revert "Cache hat block information for the runtime"
2019-04-17 16:05:24 -04:00
Karishma Chadha
a984d1ae9d
Merge pull request #1930 from mzgoddard/runtime-script-cache
...
Cache hat block information for the runtime
2019-04-17 15:55:47 -04:00
Michael "Z" Goddard
a996864cd9
test that stop all stops current threads next tick
2019-04-11 14:29:42 -04:00
picklesrus
d182659a57
Merge pull request #2065 from picklesrus/duplicate-sprites
...
Fix #4573 by using an existing utitlity that re-ids blocks when we du…
2019-04-10 09:05:53 -04:00
Christopher Willis-Ford
a1abcf3226
Add a comment clarifying the items in _blockInfo[0].blocks
2019-04-03 11:36:38 -07:00
Christopher Willis-Ford
0162bfc71e
Test the info
field in converted extension data
...
There are parts of the extension registration process which rely on the
`info` field being non-null, even for block separators. At one point
during development I broke that, so here's a test to hopefully prevent
someone else from getting bitten by the same thing.
2019-04-03 11:02:56 -07:00
Christopher Willis-Ford
87a88e2caf
Add a button to the CoreEx extension
2019-04-02 23:13:01 -07:00
Christopher Willis-Ford
9eef05a7c5
Use new Scratch-specific callback keys for extension buttons
2019-04-02 22:47:26 -07:00
Christopher Willis-Ford
254edd48d5
Add unit test for extension button
2019-04-01 18:09:09 -07:00
Katie Broida
445ee46984
Merge pull request #1943 from ktbee/clock-timer-compat-fix
...
Start executing hats before other threads change values
2019-03-29 13:01:28 -04:00
Katie Broida
2a60391fb4
Make Scratch 3 project timer more compatible with Scratch 2 currentMSecs usage
...
These compatibility changes:
- Use runtime.currentMSecs for the Clock timer "now" value
- Start executing hats before other threads change values
- Update test and fixtures to work with earlier hat execution
- Add test for hat execution block order
2019-03-29 11:43:37 -04:00
Karishma Chadha
e89f5d0361
Merge pull request #2060 from kchadha/load-core-extension
...
Load core extensions synchronously
2019-03-28 14:05:16 -04:00
Karishma Chadha
eccdeff2ce
Use async require with coreExample extension. Log a warning when attempting to load a non-built in extension synchronously. Simplify unit test.
2019-03-26 12:03:00 -04:00
Eric Rosenbaum
d49c7b732c
stub timer to fix flaky test
2019-03-26 11:56:50 -04:00
picklesrus
45ef63a648
Remove unused import.
2019-03-25 11:35:06 -04:00
picklesrus
2cf1d21b09
Fix #4573 by using an existing utitlity that re-ids blocks when we duplicate a sprite.
2019-03-25 10:18:00 -04:00
Karishma Chadha
30c9b7fd84
Add tests and update core example to handle stage being undefined.
2019-03-22 12:20:07 -04:00
Eric Rosenbaum
7f69e0ce3f
Merge pull request #2046 from ericrosenbaum/feature/tts-add-single-language-voices2
...
Add eight new languages to Text to Speech extension
2019-03-14 16:42:07 -04:00
Paul Kaplan
8d4be4eec5
Merge pull request #2045 from paulkaplan/fix-adding-custom-input
...
Allow for situation where we get a move event to attach a shadow.
2019-03-13 17:04:15 -04:00
picklesrus
7807dcecb4
Merge pull request #2042 from ktbee/clamp-graphics-effect
...
add clampEffect for limiting range of brightness and ghost effects
2019-03-13 15:23:18 -04:00
Michael "Z" Goddard
1862e5bb27
test that scripts block cache is reset
2019-03-12 17:09:59 -04:00
Katie Broida
92c1711937
add clampEffect for limiting range of brightness and ghost effects
2019-03-12 11:14:11 -04:00
Eric Rosenbaum
a968dadb7a
Use opcode function in test
2019-03-12 10:54:30 -04:00
Joke Book
0abccdc5d7
Add some unit tests
2019-03-11 23:36:59 +00:00
Paul Kaplan
2b53b8b647
Allow for situation where we get a move event to attach a shadow.
...
This happens after adding a custom procedure input to an existing custom procedure call block.
2019-03-11 14:52:40 -04:00
Eric Rosenbaum
423622daaa
Add unit tests
2019-03-07 16:33:20 -05:00
Katie Broida
c37745e97e
Cast sprite name to string before getSpriteTargetByName
2019-03-07 16:09:46 -05:00
Chris Willis-Ford
bb42c0019c
Merge pull request #1998 from cwillisf/task-queue-enhancements
...
Task queue enhancements
2019-02-25 21:28:05 -05:00
Christopher Willis-Ford
e6dd3f1175
Fix TaskQueue constructor when no options passed
2019-02-15 15:20:38 -08:00
Paul Kaplan
3b203a2a9b
Merge pull request #1995 from paulkaplan/is-discrete
...
Support isDiscrete flag on monitors
2019-02-13 11:19:51 -05:00
Christopher Willis-Ford
be040f4c9b
TaskQueue: Add option for max total cost
2019-02-12 18:57:58 -08:00
Christopher Willis-Ford
2a9a3b11b9
TaskQueue: support canceling a single task
2019-02-12 18:11:13 -08:00
chrisgarrity
7f37934eae
rewrite readProjectFile to automatically handle nested project jsons
2019-02-12 11:24:26 +01:00
Christopher Willis-Ford
d27dc5d54a
TaskQueue: reduce number of async steps before task runs
2019-02-11 12:46:48 -08:00
Christopher Willis-Ford
5a17bb1451
Add clearTimeout
to Timer and MockTimer
2019-02-11 12:14:44 -08:00
Paul Kaplan
6754fa9334
Add isDiscrete to monitor record, update sb2,3 and conversion tests
2019-02-11 11:09:01 -05:00
Paul Kaplan
8c92d195f7
Update monitors sb2 integration test for editing locally.
...
I cannot open the sb2 file without modifying the width/height of the lists, and editing+rezipping does not seem to work for me, so I need to change this width/height before I can make real changes to the tests.
2019-02-11 10:59:07 -05:00
chrisgarrity
7e9297145d
Add test for nested sb2
2019-02-11 10:24:34 +01:00
Christopher Willis-Ford
46a1ae83a0
Use MockTimer for TaskQueue tests
2019-02-07 16:35:33 -08:00
Christopher Willis-Ford
7f80fe17b3
Build a mock Timer class and add tests for it
2019-02-07 16:35:32 -08:00
Karishma Chadha
c761a9c82e
Fix issue where non-strings were getting passed in to escape functions for handling special characters that can appear in xml. Add tests.
2019-02-07 11:58:10 -05:00
Paul Kaplan
765f2b2549
Merge pull request #1983 from picklesrus/broadcast-msg-chars
...
Broadcast msg chars
2019-02-07 08:32:55 -05:00
Paul Kaplan
6deab79903
Merge pull request #1979 from paulkaplan/share-blocks-new-ids
...
Add a utility for giving blocks new IDs, use it for sharing blocks.
2019-02-07 08:31:25 -05:00
Karishma Chadha
166e5f1dbc
Update test/unit/util_new-block-ids.js
...
Co-Authored-By: paulkaplan <pkaplan@media.mit.edu>
2019-02-07 08:30:38 -05:00
picklesrus
b904f19c1d
Fix loading broadcast messages with special characters for projects that were converted from 2.0.
2019-02-06 16:58:46 -05:00
picklesrus
aead1ba8f4
Fix a typo in the variable test.
2019-02-06 16:53:25 -05:00
picklesrus
ecbfcd78bd
Fix sb2 loading of broadcast messages with special characters.
2019-02-06 16:48:39 -05:00
Paul Kaplan
b70cf39203
Update VM tests to handle shared block having new ID
2019-02-06 10:35:03 -05:00
Paul Kaplan
31fbcfa4d7
Add a utility for giving blocks new IDs, use it for sharing blocks.
2019-02-06 10:16:22 -05:00
Karishma Chadha
4e924bf4b5
Merge pull request #1973 from kchadha/fix-variable-characters
...
Fix variable characters
2019-02-05 17:01:43 -05:00
Karishma Chadha
c796a8b1cc
Merge pull request #1962 from LLK/project-dirty-state-fixes
...
Project dirty state fixes
2019-02-05 16:38:30 -05:00
Karishma Chadha
cd8de5f156
Add tests! =]
2019-02-04 19:05:44 -05:00
Karishma Chadha
166bc37f6f
Merge pull request #1945 from yokobond/fix-message-variable-name-destruction
...
Escape variable name in XML
2019-02-04 10:10:13 -05:00
Karishma Chadha
b2f63cdbb4
Add tests for project state changes emitted by editing blocks.
2019-01-30 10:59:25 -05:00
Karishma Chadha
ee936e3d36
Fix tests for reordering costumes and sounds.
2019-01-30 10:59:25 -05:00
Karishma Chadha
df823a06f6
Add tests for project changed state.
2019-01-30 10:59:25 -05:00
Karishma Chadha
a9cf509a55
Merge pull request #1941 from kchadha/add-runtime-to-blocks
...
Add reference for `runtime` to blocks container
2019-01-30 10:57:45 -05:00
Karishma Chadha
e0b0d35b46
Add references to runtime to constructor calls for Sprite, Target, and RenderedTarget so blocks get created properly.
2019-01-29 15:30:45 -05:00
Karishma Chadha
7ac8721aa5
Add references to runtime to existing calls to Blocks constructor in tests.
2019-01-28 19:30:42 -05:00
Karishma Chadha
18e9a08775
Use beforeEach instead of a fake set up test
2019-01-28 10:53:42 -05:00
Karishma Chadha
94fa3d56c8
Fix saving and loading of slider min max values. Add test for sb2 to sb3 conversion that tests all montior properties remain the same after save and load.
2019-01-25 14:14:46 -05:00
yokobond
8eee92d41a
Escape variable name in XML
2019-01-25 10:31:33 +09:00
Karishma Chadha
0bf5d8ab90
Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function.
2019-01-24 15:26:16 -05:00
Karishma Chadha
0fa5e9181a
Merge pull request #1839 from mzgoddard/fix-missing-no-param
...
fix: initialize stack frame params for all procedures
2019-01-16 14:06:38 -05:00
Karishma Chadha
59a865ef47
Create a new addTarget
function on the runtime which populates the targets list as well as the executable targets list.
2019-01-14 11:48:11 -05:00
Karishma Chadha
fbee37e915
Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed).
2019-01-11 14:52:34 -05:00
Paul Kaplan
2346f440c8
Merge pull request #1898 from paulkaplan/re-enable-tests
...
Re enable tests that were unavailable during maintenance
2019-01-08 13:45:17 -05:00
Karishma Chadha
01970fa6f0
Update test/unit/util_task-queue.js
...
Co-Authored-By: paulkaplan <pkaplan@media.mit.edu>
2019-01-08 13:29:04 -05:00
Paul Kaplan
cba3eefb52
Re enable tests that were unavailable during maintenance
2019-01-07 12:59:33 -05:00
Karishma Chadha
85843e5d6f
Fix cloud variable limit
2019-01-07 11:12:47 -05:00
Ray Schamp
11546c7f0d
Skip failing tests, this is @thisandagain's fault :)
2019-01-02 12:41:09 -05:00
Karishma Chadha
c5284469d3
Merge pull request #1831 from apple502j/stop-ask
...
Clear ask bubble when stopForTarget
2018-12-26 10:29:23 -05:00
apple502j
87df9610a6
Also here and there
2018-12-22 16:57:20 +09:00
apple502j
e11ff6ba19
Fix test
2018-12-22 16:56:45 +09:00
Karishma Chadha
397711b822
Update sb1-converter and add an sb import integration test.
2018-12-21 14:22:33 -05:00
julescubtree
9e2dab0105
fix linting error in serialization_sb3.js
2018-12-17 09:50:17 -08:00
julescubtree
9aa23a31ee
add test file for loading draggability unit test
2018-12-17 09:44:14 -08:00
julescubtree
7a9bea5007
add unit test for loading draggability
...
to serialization_sb3.js
2018-12-17 09:40:56 -08:00
Karishma Chadha
dfd4735871
Merge pull request #1833 from kchadha/fix-sb2-from-sb1-import
...
Fix issue importing some sb2s that were originally sb1s, with baseLayerMd5 property formatted differently.
2018-12-13 15:59:44 -05:00
Paul Kaplan
2f6527cb1d
Merge pull request #1843 from paulkaplan/fix-mouse-rounding
...
Round the values reported from the sensing mouse x/y reporters
2018-12-13 11:27:05 -05:00
Paul Kaplan
1bede31ec1
Round the values of mouse io getScratchX/Y
2018-12-13 11:06:31 -05:00
Michael "Z" Goddard
20ff75b776
fix: initialize stack frame params for all procedures
...
A previous change fixed compatibility with Scratch 2 removing 3's
unintentional scope leaking. This furthers that change so that
procedures with no parameters will also not accidentally use values in
other procedure stacks.
2018-12-13 10:51:44 -05:00
Karishma Chadha
6c51c40245
Merge pull request #1834 from kchadha/edge-hat-duplicate-sprite
...
Fix issue where edge-activated hats only run on one sprite after duplicating the sprite
2018-12-12 21:13:09 -05:00
Karishma Chadha
95dafb43c4
Serialize x and y for topLevel blocks even if one or both of the values is 0.
2018-12-12 18:51:36 -05:00
Karishma Chadha
6c4fb29523
Move tracking of edge activated hat values into target.
2018-12-12 12:05:55 -05:00
Karishma Chadha
19737d4e39
Fix issue where edge-activated hats only run on one sprite when sprite is duplicated or cloned.
2018-12-11 12:28:37 -05:00
Karishma Chadha
27be6f1677
Add integration test
2018-12-10 18:24:28 -05:00
picklesrus
ebe06a97d9
Merge pull request #1818 from picklesrus/monitor-vars-project-load
...
Clear out the blocks in dispose. Fixes #1758 where old monitored vari…
2018-12-07 15:08:09 -05:00
Ray Schamp
758c0a765d
Merge pull request #1808 from rschamp/disable-task-queue-tests
...
Skip task queue tests
2018-12-06 15:51:52 -05:00
Paul Kaplan
8405ff00d4
Merge pull request #1825 from paulkaplan/emit-start-publicly
...
Emit PROJECT_START event publicly on green flag click.
2018-12-06 15:38:05 -05:00
Paul Kaplan
56c062eee3
re-emit the PROJECT_START event publicly, add unit test
2018-12-06 11:47:09 -05:00
Karishma Chadha
87f57c8c95
Merge pull request #1823 from kchadha/slider-cloud-vars
...
Request cloud variable update in top level setVariableValue API
2018-12-06 10:56:07 -05:00
Paul Kaplan
23d9c21a0e
Merge pull request #1822 from paulkaplan/fix-list-clones
...
Make duplicateVariable deep copy the array instead of keeping reference.
2018-12-06 09:21:41 -05:00
Paul Kaplan
4756726e43
Merge pull request #1816 from paulkaplan/do-save-tl-var-blocks
...
Add a test and fix for not serializing top-level variable reporters
2018-12-06 05:32:23 -05:00
Karishma Chadha
499209c174
Update test/unit/engine_target.js
...
Co-Authored-By: paulkaplan <pkaplan@media.mit.edu>
2018-12-06 05:30:17 -05:00
Karishma Chadha
78e5f93544
Update test/unit/engine_target.js
...
Co-Authored-By: paulkaplan <pkaplan@media.mit.edu>
2018-12-06 05:30:10 -05:00
Karishma Chadha
dc4fd15197
Make a cloud device requestVariableUpdate when setting a variable through the vm's top level setVariableValue API. Add unit test for new functionality.
2018-12-05 22:38:06 -05:00
Paul Kaplan
809d2de9f2
Fix typo uncovered by loading lonely variable reporters
2018-12-05 16:59:47 -05:00
picklesrus
694af40964
Fix the monitor threads test. It was written before monitors could be loaded so was hand editing the monitorBlocks before loading the default project. The code I added to dispose was then clearing that out.
2018-12-05 16:54:08 -05:00