Commit Graph

309 Commits

Author SHA1 Message Date
Rachel Fenichel
376bed8c46 First pass at creating mocha tests 2019-01-08 11:30:54 -08:00
Rachel Fenichel
7ec5599829 Merge pull request #2124 from google/update_chromedriver_develop
Update chromedriver version
2018-11-30 13:46:24 -08:00
Rachel Fenichel
b8d7ed1c14 Chromedriver 2.43 -> 2.44 2018-11-30 13:38:40 -08:00
BeksOmega
1c4ba38300 Added Max Instances Property to Workspace Options (#2130)
* Added Max Instances property to Blocks

* eslint cleanup

* eslint cleanup 2

* Moved maxInstances property from block to workspace (as a map of block type to max instances). isDuplicate() changed to correctly handle siblings/branches.

* eslint cleanup

* Changed checking types to map. Added hasBlockLimits. Fixed Nits.

* Added limit_instances test block. eslint fixes.

* fixup! Added limit_instances test block. eslint fixes.

* Changed sorting objects to a private static function of the workspace. Fixed nits. Undeleted .eslintrc

* Reverted .gitignore file.

* Added getBlockTypeCounts() to utils. Added isCapacityAvailable() to workspace. Changed clipboard to save typeCountsMap rather than object.
2018-11-27 16:34:21 -08:00
Rachel Fenichel
6169a6488f Merge pull request #2139 from rachel-fenichel/bugfix/2107
Bugfix/2107
2018-11-27 13:57:10 -08:00
Rachel Fenichel
9ed9dd2f08 Add tests 2018-11-27 13:48:23 -08:00
alschmiedt
76538e67e7 Merge pull request #2133 from alschmiedt/single_code_block
Generate Code For Single Block
2018-11-27 13:38:20 -08:00
alschmiedt
d64b6fe9e0 Changes function name 2018-11-27 13:31:32 -08:00
alschmiedt
e9773be499 Adds tests for a nested loop and disabled block 2018-11-27 09:32:48 -08:00
alschmiedt
6366d7be24 Tests blockToCode function for all generators 2018-11-21 11:45:25 -08:00
Rachel Fenichel
c7b502820b Merge pull request #1987 from rachel-fenichel/feature/insertion_markers
Insertion markers in Blockly!
2018-11-19 16:32:15 -08:00
Rachel Fenichel
13740f4c84 Add tests for canConnectToPrevious 2018-11-19 14:50:00 -08:00
Rachel Fenichel
779e70f640 Update selenium version 2018-11-19 13:28:59 -08:00
Rachel Fenichel
53d8ac8b0b Prefer inserting to wrapping for c-shape blocks 2018-11-19 11:16:03 -08:00
Rachel Fenichel
a4c3d1bd89 Update chromedriver version 2018-11-16 17:31:34 -08:00
Rachel Fenichel
17823db4df Fix problem with connecting a statement into a stack, but not a c-shape block 2018-11-14 11:22:57 -08:00
Rachel Fenichel
898810d709 Use firefox for generator tests 2018-11-14 10:56:33 -08:00
Rachel Fenichel
b33d832373 Check whether generator tests work under chrome + osx 2018-11-12 11:48:09 -08:00
Rachel Fenichel
6e300cc27c Add firefox to travis; quit early if files are not found in generator tests 2018-11-09 16:50:57 -08:00
Rachel Fenichel
abd22e867c Remove vestigial button 2018-11-09 13:25:29 -08:00
Rachel Fenichel
6202919272 Make generator tests compare results against golden files; add golden files. 2018-11-09 13:22:34 -08:00
Rachel Fenichel
a248c012f4 Run generator tests and save a file with the generated js! 2018-11-06 11:13:28 -08:00
Rachel Fenichel
9e9e566d89 add test skeleton 2018-11-06 11:13:28 -08:00
Rachel Fenichel
29e836770d Remove bad classes 2018-10-31 15:05:28 -07:00
Rachel Fenichel
e3bf012c20 Use checkboxes instead of dropdowns for generator tests 2018-10-29 15:41:43 -07:00
Rachel Fenichel
adb1921e21 Add suite name to generator tests 2018-10-18 17:47:58 -07:00
Rachel Fenichel
5fcadc0a05 Use checkboxes instead of a dropdown for generator test selection 2018-10-18 17:11:20 -07:00
Neil Fraser
8d70598b6b Recompile due to changed dependencies. 2018-10-16 11:34:10 -07:00
Nadya Febiana Djojosantoso
e1217252ff Update math_atan2 unit test 2018-10-15 21:01:53 -07:00
Nadya Febiana Djojosantoso
da48f3c66f Add math_atan2 unit test 2018-10-11 15:14:08 -07:00
Nadya Febiana Djojosantoso
d822efa322 Add math_atan2 block to demos and playgrounds 2018-10-11 14:56:13 -07:00
Neil Fraser
346b24aa74 Playground upgrades (#2063)
Adds two new blocks to the playground's test blocks.
Fixes dropdown which previously could not be set to 'Test Blocks' due to missing condition.
Simplifies detection of file:// url.
2018-09-25 13:59:26 -07:00
ImgBotApp
583dfea6dd [ImgBot] optimizes images
*Total -- 61.18kb -> 44.41kb (27.42%)

/demos/headless/icon.png -- 4.26kb -> 1.80kb (57.72%)
/demos/interpreter/icon.png -- 3.13kb -> 1.71kb (45.13%)
/tests/media/g.png -- 1.14kb -> 0.66kb (42.17%)
/tests/media/50px.png -- 1.55kb -> 0.93kb (40.31%)
/demos/graph/icon.png -- 1.72kb -> 1.03kb (40.01%)
/tests/media/30px.png -- 1.10kb -> 0.67kb (39.4%)
/media/sprites.png -- 4.05kb -> 2.53kb (37.41%)
/tests/media/m.png -- 1.02kb -> 0.65kb (36.49%)
/tests/media/c.png -- 0.84kb -> 0.59kb (29.21%)
/tests/media/b.png -- 0.75kb -> 0.55kb (26.79%)
/demos/accessible/icon.png -- 1.38kb -> 1.01kb (26.69%)
/demos/generator/icon.png -- 3.52kb -> 2.61kb (25.64%)
/tests/media/a.png -- 0.76kb -> 0.57kb (25.45%)
/demos/fixed/icon.png -- 2.06kb -> 1.57kb (24.08%)
/tests/media/d.png -- 0.72kb -> 0.55kb (23.58%)
/demos/resizable/icon.png -- 3.18kb -> 2.47kb (22.27%)
/demos/toolbox/icon.png -- 2.76kb -> 2.16kb (21.83%)
/demos/rtl/icon.png -- 3.07kb -> 2.41kb (21.46%)
/tests/media/200px.png -- 2.11kb -> 1.67kb (21.06%)
/appengine/apple-touch-icon.png -- 3.93kb -> 3.15kb (19.78%)
/demos/code/icon.png -- 3.95kb -> 3.19kb (19.44%)
/demos/blockfactory_old/icon.png -- 4.34kb -> 3.55kb (18.17%)
/demos/maxBlocks/icon.png -- 1.96kb -> 1.61kb (17.87%)
/tests/media/k.png -- 0.60kb -> 0.50kb (16.18%)
/demos/plane/icon.png -- 3.32kb -> 2.80kb (15.63%)
/demos/storage/icon.png -- 3.19kb -> 2.71kb (14.99%)
/media/quote0.png -- 0.78kb -> 0.75kb (3.14%)
2018-09-23 13:31:54 -07:00
RoboErikG
9eacd7d3b9 Disable/enable function calls along with their definitions (#2019)
Fixes #1344

Extends the event listener on procedure caller blocks to also check
for their definition being enabled/disabled and update their own
state in response.
2018-08-23 11:18:29 -07:00
Andrew n marshall
46ee2d90fb Moving media/test_* files (PR #2004)
...to tests/media/.
2018-08-15 14:42:53 -07:00
RoboErikG
22fc0f8af9 Add test for replacing a rendered shadow block (#1981)
PR #1970 created a bug that only occurred when replacing a rendered
shadow block. Add a test for this case to prevent breaking it again.
2018-08-14 09:52:02 -07:00
Rachel Fenichel
341865c80c Merge pull request #1995 from rachel-fenichel/feature/unplug_horizontal
Heal rows when unplugging, and add tests
2018-08-06 11:28:12 -07:00
Rachel Fenichel
b89487e332 Ignore whether parent has multiple inputs 2018-08-06 11:18:00 -07:00
Neil Fraser
c6afb08c4b Add unit tests and code cleanup to utils (#1993)
* Add unit tests for new util functions
* Utils functions shouldn’t be package, not private.
* Use existing utility function for insertAfter
2018-08-03 14:31:50 -07:00
Rachel Fenichel
b65491e656 Heal rows when unplugging, and add tests 2018-08-03 13:54:29 -07:00
Rachel Fenichel
b52267bee9 Tests for block.unplug 2018-08-02 17:35:10 -07:00
RoboErikG
61803167d8 Add test for deleting a rendered block with a comment (#1984)
Disabled for now as it fails due to #1960.
2018-07-23 10:56:37 -07:00
RoboErikG
c815608fdf Fix failing svg canvas test (#1977)
Partial fix for #1976. This fixes the broken test by initializing the
svg for blocks when they're created.
2018-07-17 09:35:53 -07:00
Rachel Fenichel
999f8a114d Remove variable IDs from colour test XML 2018-06-29 10:47:03 -07:00
Rachel Fenichel
28eb831754 Better error messages in colour generator tests 2018-06-27 14:41:53 -07:00
Rachel Fenichel
83855248a6 Correctly adjust indices in colour tests 2018-06-27 14:32:40 -07:00
Andrew n marshall
eafc3cd099 Adding appropriate test values to number field test blocks (#1943) 2018-06-26 18:19:01 -07:00
Rachel Fenichel
3c6a29c705 Move a test function into utils 2018-06-07 16:58:58 -07:00
Rachel Fenichel
55dca1eed5 Update chromedriver version
See https://github.com/LLK/scratch-blocks/pull/1568
2018-06-07 11:25:42 -07:00
Rachel Fenichel
7b29ea9bf3 Add some workspace comment tests 2018-06-06 17:12:23 -07:00