Commit Graph

22 Commits

Author SHA1 Message Date
Tim Gates
6c0c81d2f8 docs: Fix a few typos (#5655)
There are small typos in:
- closure/goog/base.js
- core/contextmenu_items.js
- core/insertion_marker_manager.js
- core/toolbox/collapsible_category.js
- demos/blockfactory/workspacefactory/wfactory_controller.js
- demos/blockfactory/workspacefactory/wfactory_view.js
- tests/mocha/field_colour_test.js

Fixes:
- Should read `updates` rather than `udpates`.
- Should read `unhighlighting` rather than `unhiglighting`.
- Should read `then` rather than `tehn`.
- Should read `modified` rather than `modifed`.
- Should read `different` rather than `diffferent`.
- Should read `currently` rather than `currenly`.
- Should read `browser` rather than `broswer`.
2021-11-02 17:44:40 -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
Beka Westberg
8faa360b74 feat: upgrade fields to use new JSO hooks (#5077)
* Upgrade field angle to use new serialization

* Upgrade field checkbox to use new serialization

* Upgrade field colour to use new serialization

* Upgrade field dropdown to use new serialization

* Upgrade serializable label field to use new serialization

* Upgrade field multiline input to use new serialization

* Upgrade field number to use new serialization

* Upgrade field text input to use new serialization

* Upgrade variable field to use new serialization

* Fix type casts

* Feedback from PR

* Switch to use getValue()
2021-09-20 13:08:35 -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
Neil Fraser
c8bea1ff3a Remove return value from Field dropdownCreate_ (#4915)
These functions have side effects and set all kinds of private fields.  It is misleading for them to return the top-level element, for the caller to assign to a private field.
2021-06-18 08:22:25 -07:00
Monica Kozbial
dec7463a49 Update FieldCheckbox and FieldColour setValue tests (#4332)
* update FieldCheckbox setValue tests

* update FieldColout setValue tests
2020-09-29 10:09:05 -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
4ac4332f5e Update logic for field default values. (#3953)
* Update logic for field default values.

* Fix bugs

* Use contant for default value.

* Fix FieldColour

* Update field number tests.

* Update field angle test.

* Minor update.

* Update field checkbox test.

* Undo enabling logging

* Remove only.

* Update field colour test.

* Update invalid test cases for field colour

* Update field label tests

* Update field textinput test.

* Minor cleanup

* Make lint happy.
2020-06-12 15:18:28 -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
Sam El-Husseini
4f9b4a707a Add field set source block tests (#3796)
* Set the source block on fields in mocha tests.
2020-04-03 14:50:33 -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
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
Sam El-Husseini
f3f3329355 Fix configure method (#2915)
* Fix configure method.
2019-09-12 17:01:03 -07:00
Beka Westberg
0d482c6488 Changed colour field to new configuration paradigm. 2019-08-20 09:44:14 -07:00
Neil Fraser
c8e3938eba Remove field tests with null
Null is explicitly disallowed in most field constructors.  Thus the random results of passing null are undefined and may change.  These changes should not be tested against.

Exceptions:  Variable and serializable lable fields acually do take null.

This commit is due to the upcoming parseInt->Number commit which happens to change how null behaves.

Also added missing ‘empty’ test for checkboxes.
2019-08-01 11:36:58 -07:00
Rachel Fenichel
afd2b09453 Add func-call-spacing rule 2019-07-31 09:43:21 -07:00
alschmiedt
ceffe5c9f5 Merge pull request #2498 from BeksOmega/tests/SetValueAbstract
Added More setValue Test Coverage
2019-05-30 13:10:08 -07:00
Beka Westberg
e6caa50131 Added more setValue test coverage. 2019-05-25 10:20:20 -07:00
Beka Westberg
06c6d83355 Changed colour field class validator to accept all documented values. 2019-05-24 16:14:49 -07:00
Beka Westberg
f16c9c0beb Refactored field validation. 2019-05-24 14:23:42 -07:00
Beka Westberg
acd96aa2c5 Added Field Value Tests (#2459)
* Added field value tests.

* Fixed field image src param.

* Fixed falsy values with label fields.

* Fixed falsy values with text input fields.

* Fixed some angle field tests.

* Fixed other text input when editing tests.

* Fixed colour tests.

* Cleaned up some number and variable field tests.

* Added angle field > 360 degrees tests.

* Fixed variable validator tests.

* Split setValue tests into sub-suites.

* Fixed angle >360 tests

* Changed var declarations to property declarations.
2019-05-17 15:19:14 -07:00