Commit Graph

26 Commits

Author SHA1 Message Date
Rachel Fenichel
0ae10fe516 chore: replace var with let and const in mocha tests (#5638)
* chore: replace var with let and const in mocha tests

* chore: change let to const in changed lines
2021-10-26 11:02:36 -07:00
Rachel Fenichel
52c0427d85 chore: run eslint--fix for no-var rule in tests/mocha (#5637) 2021-10-25 11:37:23 -07:00
kozbial
57ccb1e14a Remove unecessary block variable block definition 2021-09-23 12:31:55 -07:00
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
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
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
Monica Kozbial
fa36fdb01f Xml test cleanup (#4119)
* Add call for shared setup and cleanup

* Fix test errors

* Add missing workspace cleanup.
2020-08-10 16:01:41 -07:00
Monica Kozbial
3868db3221 Refactor shared (#4066)
* Refactoring event helpers.

* Fix concurrent test failure.
2020-07-24 14:49:39 -07:00
Sam El-Husseini
888e348c69 Clean out the date field (#3876) 2020-05-06 09:42:24 -07:00
Monica Kozbial
bbc13cfd57 Add wait for xml test case. (#3855) 2020-04-24 15:07:57 -07:00
Monica Kozbial
0adf7efd5f Converting jsunit asserts to chai. (#3831)
* Converting jsunit asserts to chai.

* Move jsunit functions to test_utilities.

* Adding eslint exception for helper method.
2020-04-17 16:08:46 -07:00
Monica Kozbial
d61f3c6f38 Converting extensions_test to mocha. (#3820)
* Converting extensions_test to mocha.

* Add spacing between test cases.

* Fix cleanup for block type.

* Add cleanup for event state.
2020-04-15 15:55:49 -07:00
Monica Kozbial
8a2fe6411f Converting xml tests to mocha. (#3818)
* Converting xml tests to mocha.

* Remove async

* Updating no variable test.

* Addressing PR comments.
2020-04-14 14:10:10 -07:00
Neil Fraser
4e2f8e6e02 Use SPDX licences.
This is a followup to #3127.
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Monica Kozbial
c84ee46a89 Setting default options in workspace constructor. (#3592)
* Setting default options in workspace constructor.

* Changing logic for parsing workspace options.

* Adding gridPattern declaration to options and updating options handling for workspace.

* Addressing PR comments.

* Moving objects to constructor.

* Using constructor instead of casting for Blockly.Options.

* fix eslint

* Adding types.

* Change in type.

* eslint fix.

* Fix typings.
2020-01-17 15:16:20 -08:00
Neil Fraser
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
Neil Fraser
b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -07:00
Monica Kozbial
f4136fdc2a Adding test and updating TODO. (#3102)
* Adding test and updating TODO.

* changing bug number referenced in TODO
2019-09-27 11:12:37 -07:00
Beka Westberg
9e5df6216a Fixed comment ownership. (#2923)
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it.
* Reorganized the setVisible function.
* Changed how xml.js serializes and deserializes comments.
2019-09-20 13:16:07 -07:00
Beka Westberg
680321fb1d Don't try to be fancy. 2019-08-16 12:25:22 -07:00
Beka Westberg
0714335bbb And fix the XML test too. 2019-08-16 12:17:08 -07:00
Neil Fraser
829dcc207c Make type and variabletype attributes optional
If a variable doesn’t have a type, then don’t add these empty attributes in the XML.
2019-07-15 14:37:27 -07:00
Beka Westberg
3afcd23535 Removed explicitly setting variable type to two single quotes. 2019-05-01 14:31:20 -07:00
Beka Westberg
ce816b93bf Added field_label_serializable. (#2399) 2019-04-24 10:43:09 -07:00
Beka Westberg
148823146d Fixed lint errors 2019-04-22 10:55:36 -07:00
Beka Westberg
e8573bc0db Added isSerializable function and SERIALIZABLE property to fields. 2019-04-21 08:28:37 -07:00