Commit graph

79 commits

Author SHA1 Message Date
Paul Kaplan
80e8003fb2 Add tests for rendered target 2017-04-06 09:46:40 -04:00
Paul Kaplan
771f18e23b Merge pull request #516 from paulkaplan/add-sound-public-api
Expose VM#addSound publicly
2017-04-04 09:05:45 -04:00
Ray Schamp
57e73a68a6 Add costume dataURI to costumes from storage (#517)
* Add costume dataURI to costumes from storage

Towards #515, LLK/scratch-gui#279

* Fix tests

* Load costumes incrementally

Some of our tests assume that at least some of our costume data is available before the costume data is loaded. So, provide as much costume data as is available.

* Remove unnecessary filter for null costumes

Resolved when we updated to load costumes incrementally.

/ht @cwillisf
2017-04-03 15:58:13 -04:00
Chris Willis-Ford
a4aa3810ae Merge pull request #462 from griffpatch/optimise/reduceGetBlockCalls
Optimise reducegetblockcalls
2017-04-03 13:00:05 -04:00
Paul Kaplan
251244ce9c Expose VM#addSound publicly 2017-04-03 09:33:23 -04:00
Chris Willis-Ford
c8b4871b19 Merge pull request #498 from cwillisf/use-scratch-storage
Load projects & costumes through scratch-storage
2017-03-23 22:10:25 -07:00
griffpatch
220d854f28 Merge remote-tracking branch 'refs/remotes/LLK/develop' into optimise/reduceGetBlockCalls
# Conflicts:
#	src/engine/execute.js
2017-03-22 08:58:01 +00:00
griffpatch
25429b1192 Tidy up commit and revert direct member access 2017-03-22 08:48:30 +00:00
Paul Kaplan
8bbb395b35 Add sprite name incrementing and reserved naming 2017-03-20 12:52:57 -04:00
Paul Kaplan
052ecef91c Add string utils with tests 2017-03-20 12:12:38 -04:00
Paul Kaplan
5d2352e471 Add test for skipping rename on blank input 2017-03-20 11:14:25 -04:00
Paul Kaplan
627fc1d9c3 Add tests for existing vm.renameSprite functionality 2017-03-20 11:13:24 -04:00
Chris Willis-Ford
3d7f1187e5 Merge branch 'develop' into use-scratch-storage 2017-03-13 15:48:21 -07:00
Christopher Willis-Ford
e4fd9d57a2 Fix tests involving scratch-storage
- Attach the storage module to the VM for tests which load projects or
  other assets.
- Move `import_sb2.js` from `test/unit/ into `test/integration` since it
  now depends heavily on `scratch-storage`.
- Skip loading costumes when there is no renderer.
2017-03-09 15:50:43 -08:00
Ray Schamp
b03768cad6 Remove filter toolbox utility (#496)
* Revert "Merge pull request #486 from rschamp/fix-filter-tests"

This reverts commit ba00db897f, reversing
changes made to 739c5deb63.

* Revert "Show Categories that use custom code to load (variables, procedures) (#483)"

This reverts commit 739c5deb63.

* Revert "Merge pull request #461 from rschamp/filter-toolbox"

This reverts commit 343b5bfe8e, reversing
changes made to 370f2c6a47.
2017-03-09 16:41:06 -05:00
Paul Kaplan
fe3799bb48 Add test for gfx reset on stop 2017-03-06 16:15:04 -05:00
Ray Schamp
8dadc42857 Add draggable property to sprites
This property should be managed by the VM so that it can be displayed in the sprite info panel in the GUI.
2017-03-01 18:49:17 -05:00
Ray Schamp
0b2d053177 Update tests to account for custom categories 2017-03-01 12:57:46 -05:00
Ray Schamp
6ea9b54539 Add filterToolbox unit tests 2017-02-27 12:58:18 -05:00
Andrew Sliwinski
401fd78fd0 Merge pull request #463 from CSnap/sequencerTesting
Adding Sequencer Unit Tests
2017-02-18 10:24:52 -05:00
SillyInventor
2fc2ee2c4b Adding sequencer unit tests for each function 2017-02-16 14:30:00 -05:00
Christopher Willis-Ford
3b3daf8aca Add hat execution order test 2017-02-14 16:33:42 -08:00
SillyInventor
e8949dcdf5 Added remaining tests 2017-02-10 13:06:39 -05:00
SillyInventor
3324f51193 Added some unit tests for some thread functions 2017-02-09 18:18:53 -05:00
griffpatch
9cb595312e Implement "Stop this script" function
Existing implementation incorrectly terminates the entire thread.
See: http://llk.github.io/scratch-vm/#144142535
2017-02-08 09:44:10 +00:00
Andrew Sliwinski
92ff57de7d Add basic test coverage for the sound blocks 2017-02-03 17:39:36 -05:00
SillyInventor
1ac89f5aa4 Added new util function that sends tan function infinities correctly
Changed mathop to call new math util
Changed sin & cos to round correctly (to get 0)
Added testing for the new math util function
Added testing for the new mathop functions
2017-01-31 19:05:54 -05:00
griffpatch
0dcaa46107 Fix lint issues
Had to update the test scripts to handle the alpha channel, also I note
that all the hex tests are using CSS notation, not scratch notation
(which is 0x not #)
2017-01-27 17:05:17 +00:00
Christopher Willis-Ford
f8088be127 Undo accidental harmless but unnecessary change 2017-01-20 11:37:54 -08:00
Christopher Willis-Ford
88cc50aa18 Code review: more docs, move constants, clone util
Changes include:
- Added missing JSDoc for items in `scratch3_pen.js` and `target.js`.
- Moved constants used by `Scratch3PenBlocks` into the class.
- Created a constant for minimum and maximum pen size.
- Added `util/clone.js` to host cloning functionality.
- Pen blocks now check for the renderer before trying to use it.
- The pen integration test covers all blocks, though `clear`, `stamp`,
  and `pen down` will skip some of their functionality when there is no
  renderer.
2017-01-20 11:26:18 -08:00
Christopher Willis-Ford
72f17d6dc4 Add pen integration test
See `pen.sb2` for details
2017-01-19 15:58:00 -08:00
Christopher Willis-Ford
d0845728ee Add unit tests for new color-related functionality
Also, fix a math error in `Color.rgbToHsv`.

Newly covered functions:
- `toRbgColorObject` from `util/cast.js`
- `hsvToRgb` from `util/colors.js`
- `rgbToHsv` from `util/colors.js`
- `mixRgb` from `util/colors.js`
2017-01-19 15:24:45 -08:00
Andrew Sliwinski
6ee8959100 Improve integration test coverage 2017-01-05 16:58:31 -05:00
Andrew Sliwinski
7d5820585b Resolve lint issues 2016-12-23 21:31:00 -05:00
Andrew Sliwinski
dfc6614a5b Build out integration test SB2 files 2016-12-23 21:08:13 -05:00
Andrew Sliwinski
b8af7c0723 Add minimal integration tests 2016-12-23 14:09:35 -05:00
Andrew Sliwinski
4709cae4b7 Basic integration (end-to-end) testing for default project 2016-12-23 10:39:19 -05:00
Tim Mickel
2f0ce7137c Rename Clone -> RenderedTarget (#317) 2016-10-26 11:19:43 -04:00
Andrew Sliwinski
1b4a1ca1bc Resolve merge conflicts 2016-10-24 15:53:42 -04:00
Andrew Sliwinski
153df22918 Address feedback from PR review 2016-10-24 15:16:06 -04:00
Andrew Sliwinski
5b73ffa66c Add minimal test coverage for control blocks 2016-10-24 14:38:24 -04:00
Andrew Sliwinski
8b87b36ed3 Resolve race condition with the clock tests 2016-10-24 12:03:43 -04:00
Andrew Sliwinski
336bc65e2d Add minimal test coverage and docs for mouse module 2016-10-24 11:56:52 -04:00
Ray Schamp
7712b2902f Fix quote-props 2016-10-24 11:02:19 -04:00
Ray Schamp
0e909cb9a5 Fix comma-spacing 2016-10-24 10:57:52 -04:00
Ray Schamp
f6c0064235 All linting other than console statements 2016-10-23 22:20:29 -04:00
Ray Schamp
68ed110b49 Pass with eslint --fix
Resolved whitespace issues, e.g., space-before-function-paren and key-spacing
2016-10-23 12:41:45 -04:00
Andrew Sliwinski
faf8a898a0 Add minimal test coverage and docs for keyboard module. 2016-10-21 18:31:07 -04:00
Andrew Sliwinski
7e9745ce3f Add basic test coverage for clock module. 2016-10-21 12:42:32 -04:00
Andrew Sliwinski
1615c47d80 Merge pull request #279 from thisandagain/bugfix/229
Fix `degToRad` function definition
2016-10-17 11:56:48 -04:00