Commit graph

174 commits

Author SHA1 Message Date
Christopher Willis-Ford
7d5a780638 style: fix the other lint complaints 2023-12-15 17:40:25 -08:00
Christopher Willis-Ford
15cdd2f69a
Merge pull request #2416 from adroitwhiz/no-relativetime
Remove Timer.relativeTime
2023-10-17 12:58:18 -07:00
Christopher Willis-Ford
281a3e256a test: fix flaky test execute/order-changes-backwards-2-broadcast-and-wait-repeat-message.sb2
Before: sprite 3 uses the `wait` block to wait for the other two sprites
to finish. After the `wait` blocks, sprite 3 sends "end" to the test. If
the sprites take too long to finish, they might not be done before the
"end" message.

After: sprite 3 sets a variable called `finished` to zero on startup,
and increments it every time it hears a new message. Each sprite sends
that new message once it's done. When sprite 3 notices that `finished >=
2`, it sends the "end" message.
2022-07-06 13:18:45 -07:00
Christopher Willis-Ford
8fbf3b465e test: temporarily skip flaky order-changes-backwards-2-broadcast-and-wait-repeat-message.sb2 2022-07-06 09:41:56 -07:00
Christopher Willis-Ford
e2f96762de test(clone-cleanup): go back to using an SB2
Part of the motivation for this test is to verify compatibility with
Scratch 2.0 / SB2 behavior, so we shouldn't change the project to an SB3
file without very good reason.
2022-06-10 10:14:17 -07:00
Christopher Willis-Ford
605b1c2386 test(clone-cleanup): improve clone-cleanup test reliability
Previously the test relied on the project's `wait` blocks running at roughly real time. Now, the
project drives the timing using `say` blocks.
2022-06-07 11:44:06 -07:00
Karishma Chadha
2ff83ce667 Add tests for missing and corrupt pngs in sb3 and sprite3 files 2022-05-23 19:54:45 -04:00
Karishma Chadha
3e193565ee Hook up error handling to bitmap loading flow and add tests for loading missing and corrupt bitmpas from sb2 and sprite2 files 2022-05-23 19:54:45 -04:00
Karishma Chadha
59f3c8afe9 Add sb2 and sprite2 tests for a corrupted vector costume 2022-05-21 19:51:29 -04:00
Karishma Chadha
28c6daaaf7 Mock bitmap loading and add sb2 and sprite2 tests for a missing svg costume 2022-05-21 19:51:29 -04:00
Karishma Chadha
8ab21dd701 Handle error from sound failing to load (e.g. corrupted sound) 2022-05-19 17:45:27 -04:00
Karishma Chadha
4679d06ac0 Update storage and update 'loadSound' to handle null asset from storage. Track additional metadata for broken costumes: 'bitmapResolution' and 'dataFormat'. 2022-05-18 21:26:36 -04:00
Karishma Chadha
8cf390d2b5 Fix typo 2022-05-16 17:11:55 -04:00
Karishma Chadha
1dfaa02c97 More code cleanup from PR review 2022-05-16 16:23:41 -04:00
Karishma Chadha
fd31a777e2
Code clean up from code review
Co-authored-by: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
2022-05-16 16:07:08 -04:00
Karishma Chadha
70a78cf7db Add tests for load costume error handling. Fix issue where asset data was not getting saved out properly. 2022-05-13 19:07:34 -04:00
Karishma Chadha
2d6cce5f7f
Merge pull request #2936 from adroitwhiz/remove-new-buffer
Replace `new Buffer()` with `Buffer.from()`
2021-10-27 13:59:05 -04:00
Eric Rosenbaum
8483c1a467 add test of deserializing origin 2021-05-04 15:29:36 -04:00
adroitwhiz
3c9f7557f5 Replace new Buffer() with Buffer.from()
This removes the deprecation warnings logged when tests are run.
2021-03-07 16:21:06 -05:00
DD Liu
7eabcb8a29
Merge pull request #2329 from adroitwhiz/remove-updatedrawableproperties
Remove remaining updateDrawableProperties calls
2020-09-24 15:50:26 -04:00
Eric Rosenbaum
f103094cff update test 2020-08-12 13:21:19 -04:00
Eric Rosenbaum
04a2b50fee add test 2020-08-12 11:22:01 -04:00
adroitwhiz
83bcbb8eb2 Remove Timer.relativeTime 2020-05-18 01:39:39 -04:00
DD Liu
f5ce73ae51
Merge pull request #2314 from adroitwhiz/dont-update-rotation-center
Remove calls to updateDrawableSkinIdRotationCenter
2020-04-02 14:23:02 -04:00
adroitwhiz
53429f0917 Add test for renamed local lists 2020-03-12 17:00:58 -04:00
adroitwhiz
267395b13b Remove remaining updateDrawableProperties calls 2020-02-26 21:20:50 -05:00
adroitwhiz
af860711be Add test for loading renamed list monitors 2020-02-17 01:51:19 -05:00
adroitwhiz
a434bc5a34 Remove calls to updateDrawableSkinIdRotationCenter 2020-01-30 00:53:16 -05:00
Michael "Z" Goddard
1e9f2402b1 add updateDrawable* methods to FakeRenderer 2019-11-12 13:19:53 -05:00
Karishma Chadha
c499106f85
Revert "Raise params to the next frame when pushing" 2019-07-22 12:59:48 -04:00
Michael "Z" Goddard
8d91e3cbd7
test stopThisScript in procedures
- Test that stopThisScript in a procedure stays in the procedure and
  moves it to the end where Sequencer can pop it normally
2019-06-25 14:38:46 -04:00
Michael "Z" Goddard
a996864cd9
test that stop all stops current threads next tick 2019-04-11 14:29:42 -04: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
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
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
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
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
7f80fe17b3 Build a mock Timer class and add tests for it 2019-02-07 16:35:32 -08: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
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
ecbfcd78bd Fix sb2 loading of broadcast messages with special characters. 2019-02-06 16:48:39 -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