Commit Graph

19 Commits

Author SHA1 Message Date
alschmiedt
5b1586ee1b test: update mocha tests to use goog_module (#5440)
* Use goog.module in mocha tests

* Fix compiler warnings

* Make test helpers a module

* Name test modules Blockly.test.*

This is to be more consistent with how non-test modules are named.

Also remove top-level goog.require of TestHelpers (now
Blockly.test.helpers) since requiring a side-effect-less module does
nothing.

* Convert block_test.js and comment_test.js to goog.module syntax

* Address PR comments

* Goog modulify tests

* Goog modulify toolbox helpers

* Fixes imports and moves common tests from workspace_test.js to a helper file.

* Update test deps after rebase

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2021-09-16 13:00:38 -07:00
Aaron Dodson
ce8e7921a2 Move alert/confirm/prompt to a new file, dialog.js (#5457)
* Migrate prompt/alert/confirm to dedicated module

* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js

* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm

* Fix typo and errant redeclaration of Blockly.prompt

* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
2021-09-14 08:19:53 -07:00
Monica Kozbial
2c83652733 Add missing whitespace to test files (#5031)
* Add missing spaces

* undo incorrect replaces in utils tests
2021-07-12 15:11:33 -07:00
Aaron Dodson
355c54f70a Use captureWarning helper from dev-tools instead of mocha/test_helpers.js implementation. 2021-06-15 19:10:13 +00:00
Monica Kozbial
896c630a89 Shared global cleanup (#4217)
* Refactor block type cleanup into shared cleanup.

* Use shared cleanup for block type cleanup.

* Remove overwriting of core Blockly block in test.

* Rename cleanup arrays for clarity

* Add blocks to cleanup array when defined in shared helpers

* Refactor logic for adding to shared cleanup.

* Add helper for defining block and adding block type to cleanup.

* Fix jsdocs

* Simplifying helpers for adding to cleanup.

* Add missing semicolons

* Update jsdoc for sharedTestSetup

* Use stub to wrap cleanup with defineBlocksWithJsonArray

* Remove unused helper from lint ignore
2020-09-09 15:51:34 -07:00
Beka Westberg
c732484180 Add programmatically setting shadows Take 2 (#4215)
* Add programmatically setting shadows
2020-09-08 08:50:01 -07:00
Monica Kozbial
6152354348 Check contents of warnings messages in tests. (#4212)
* Check contents of warnings messages in tests.
2020-08-21 14:45:02 -07:00
Monica Kozbial
a89ff37bd8 Add checks to WorkspaceSvg dispose and fix shared Workspace tests (#4170)
* Fix workspace tests and add add checks for WorkspaceSvg dispose

* Move flyout test to WorkspaceSvg
2020-08-17 10:32:55 -07:00
Monica Kozbial
2e92123314 Adding async cleanup to tests (#4103)
* Adding setup and teardown to more mocha tests.

* Update workspace dispose cleanup calls.
2020-08-05 16:00:00 -07:00
Monica Kozbial
b7305c1eed Shared events cleanup (#4092)
* Remove temp fix for event queue cleanup.

* Implementing shared setup and cleanup.

* Remove unecessary restore and add comment.

* Adds helper for workspace teardown

* Remove unecessary restore calls in event tests
2020-08-03 16:50:23 -07:00
Monica Kozbial
1041595932 Add clarification to remainingCapacityOfType and add tests for isCapacityAvailable. (#3952) 2020-06-10 10:23:41 -07:00
Monica Kozbial
8a2caf5c32 Distinguish between unset maxInstance and set to 0. (#3949) 2020-06-09 16:38:16 -07:00
Sam El-Husseini
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00
Sam El-Husseini
a5a3b045d3 Use the Blockly AST for block toString (#3895)
* Use the AST tree to populate block toString, add paranthesis around Number and Boolean connections
2020-05-14 17:06:35 -07:00
Monica Kozbial
e3d82fa3af Converting procedure svg tests to mocha. (#3867)
* Converting procedure svg tests to mocha.

* Removing unused function.

* cleanup
2020-04-29 11:33:11 -07:00
Monica Kozbial
e516a08430 Workspace svg tests (#3857)
* Converting workspace svg tests to mocha and calling workspace tests.

* Removing jsunit style test for workspace_svg.

* Fix eslint error.
2020-04-27 16:32:52 -07:00
Monica Kozbial
b574490072 Convert workspace redo undo tests to mocha. (#3847)
* Convert workspace redo undo tests to mocha.

* Adding details to asserts and test case names.

* Adding additional checks for undo/redo tests.

* Bumping timeout and addressing comments.
2020-04-22 16:24:02 -07:00
Monica Kozbial
bb3b20443b Convert remaining tests in workspace_test. (#3841) 2020-04-20 16:52:56 -07:00
Monica Kozbial
17eade1017 Partial conversion of workspace tests to mocha. (#3838) 2020-04-17 16:31:12 -07:00