Commit Graph

352 Commits

Author SHA1 Message Date
alschmiedt
cccc4693a5 Remove extra output from generator and mocha tests (#5196)
* Remove extra output from generator tests

* Fix test

* Update loglevel for both tests
2021-07-27 11:03:16 -07:00
jschanker
de1b3214be Enforce connection preconditions for setParent (#4999)
* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Error now thrown when calling `a.setParent(null)` if a is connected to a superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.

* Fix error conditions for setParent google#4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.
* Adjusted comment.

* Removed unnecessary set to null/added tests

* One is failing (commented out), will investigate later

* Lint fix

* Removed failing test that correctly fails

* Update comments to conform to style guide

Capitalize first letter, period at end
2021-07-13 13:56:42 -07:00
Monica Kozbial
0af6bc4b01 Remove unused parameters from test helpers (#5032) 2021-07-13 13:13:06 -07:00
Monica Kozbial
e2d0498db2 Add flag to webdriverio options (#5035)
* Add flag to webdriverio options

* update indentation of code
2021-07-13 09:31:21 -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
Beka Westberg
13bb9f5bf6 Refactor connect logic (#4880)
* Refactor connect logic.

* Fixup from rebase

* Fix build

* PR Comments
2021-06-18 09:53:43 -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
Aaron Dodson
245a44b030 Merge pull request #4920 from gonfunko/capture-warning
Use captureWarning helper from dev-tools instead of mocha/test_helpers.js implementation
2021-06-17 16:04:23 -07:00
jschanker
672574b056 Require field name to be string, test changes
* Now throws error for getField/getFieldValue/setFieldValue if provided name is not a string
* Changed error to more specific TypeError
* Type checking and error message moved up to getField
* Tests added/modified to check that non-string types for field names produce type errors
2021-06-16 10:46:05 +01:00
jschanker
f9c5260fb0 Added tests/setFieldValue error message
* Added tests for getting/setting field (values) when names are not supplied and test for getting a field value, setting it to a new value, and getting it again.
* Added more user-friendly error message for setFieldValue telling the developer that he/she is missing the name rather than Field "undefined" not found.
2021-06-16 10:46:05 +01: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
Aaron Dodson
df7da795a3 Use selenium-standalone-service to automatically start and stop Selenium when running the test suite. 2021-06-14 11:52:49 -07:00
Neil Fraser
96315ad449 Fix removal of spaces near parens inside strings
Extra spaces should only be stripped from the inside of paren tokens.  Parens in strings (and other static content) should not be edited.
2021-06-09 22:16:35 -07:00
Monica Kozbial
8e7cb406f9 Handle overriding components in ComponentManager (#4856) 2021-06-08 12:28:59 -07:00
Monica Kozbial
6f7ead6e9c Fix error caused by extra teardown call (#4877) 2021-06-08 10:19:08 -07:00
Beka Westberg
ab5616cff7 Add tests for connecting blocks (#4853) 2021-06-07 08:14:13 -07:00
Neil Fraser
a385f3c2a6 Enable extraction of names from name DB.
Also gets rid of hacky name_realm contatination.
2021-05-27 21:30:26 -07:00
Beka Westberg
5ffd43824f Change lastConnectionInRow to getPlaceForOrphanedOutput - Take 2 (#4851)
* Change lastConnectionInRow to getPlaceForOrphanedOutput

* PR comments
2021-05-26 09:16:33 -07:00
Beka Westberg
9fbf06c5df PR Comments 2021-04-27 15:59:25 -07:00
Beka Westberg
43e95af14e Fix getDefinition being too restrictive 2021-04-25 14:46:51 -07:00
Monica Kozbial
5139057664 Merge consecutive viewport change events (#4792) 2021-04-23 10:56:52 -07:00
Monica Kozbial
62dc2ff6fa Include oldCoordinate and oldContents in ws comment event serialization (#4718)
* Include oldCoordinate and oldContent in ws comment event serialization
2021-03-22 08:41:31 -07:00
Monica Kozbial
7eabb8e8a3 Update inccorect jsdoc in mocha tests (#4707) 2021-03-19 16:33:41 -07:00
alschmiedt
d58c80db76 Refactor flyout and toolbox metrics (#4648) 2021-03-15 12:37:23 -07:00
alschmiedt
869e4eb366 Update flyout metrics to work with the new metrics manager (#4684) 2021-03-09 17:09:49 -08:00
Sam El-Husseini
17d2e72ab0 Fix circular dependencies in shortcut + contextmenu registries (#4681)
* Fix circular dependencies in shortcut and contextmenu registries
2021-03-08 13:35:11 -08:00
Rachel Fenichel
855185c6cf Merge pull request #4682 from rachel-fenichel/toolbox_constants
Use Blockly.utils.toolbox.Position enum everywhere
2021-03-08 10:52:58 -08:00
Monica Kozbial
f837f1e44e Add zoom support for single-direction-scroll (#4653)
* Add zoom support for single-direction scroll
2021-03-05 14:37:41 -08:00
Rachel Fenichel
f7e0d5f4ea Use existing toolbox position enum 2021-03-05 14:16:43 -08:00
Rachel Fenichel
59084a043c TOOLBOX_AT_TOP and friends -> constants.toolboxPosition.TOP, etc 2021-03-05 13:48:45 -08:00
Monica Kozbial
57749e6eb8 Updating bump logic to support single-direction scrollbars (#4652)
* Updating bump logic to support single-direction scrollbars
2021-03-01 12:20:12 -08:00
Rachel Fenichel
485e4cd505 Fix test 2021-02-26 11:25:10 -08:00
Rachel Fenichel
4e31deca2b Align constants -> Blockly.constants.ALIGN enum 2021-02-26 11:12:53 -08:00
alschmiedt
7b30cc76a4 Adds tests for metrics manager (#4635) 2021-02-18 13:45:53 -08:00
alschmiedt
a8f28c6b11 Metrics refactor (#4627) 2021-02-10 16:19:56 -08:00
Beka Westberg
87f4799be7 Remove last FieldLabel call and fix adding dummy inputs to json (#4601)
* Change insertFieldAt to use registry

* Fix adding dummy input for non field_ prefixed fields

* Remove bad new keyword

* Add type cast
2021-02-05 16:03:32 -08:00
alschmiedt
26beff4b2c Migrate our tests to use github actions (#4614) 2021-02-02 10:08:51 -08:00
Beka Westberg
75f118b4f9 Refactor interpolate_ into multiple functions & remove direct new Field call (#4585)
* Refactor interpolation

* Added docs

* Add tests

* Add test for dummy input after field not prefixed with field_

* Fix typings

* Pr comments
2021-01-22 12:44:50 -08:00
alschmiedt
a3adc42e8a Remove keyboard navigation from core (#4593) 2021-01-19 11:50:51 -08:00
Monica Kozbial
540ab16842 Fix serialization of workspace comment events and add tests (#4578)
* Fix serialization of workspace comment events and add tests
2021-01-11 16:14:34 -08:00
alschmiedt
fe0f401977 Fix collapsing bug and add tests (#4568) 2021-01-11 09:05:59 -08:00
alschmiedt
1043257f87 Fix ios12 bug (#4517)
* Changes mousedown to click event
2020-12-11 09:47:35 -08:00
Monica Kozbial
b5e045fd2b Unskip test that is now passing (#4493) 2020-12-03 11:04:18 -08:00
alschmiedt
520aa600a6 Remove deprecated field functions (#4489) 2020-12-02 14:54:28 -08:00
Monica Kozbial
5153a32424 Remove debugging console log from test (#4482) 2020-11-30 14:22:43 -08:00
alschmiedt
97117bdb12 Update method names in shortcut registry (#4479) 2020-11-30 10:52:09 -08:00
Maribeth Bottorff
b5c77137bd factor out getX and getY methods for flyouts (#4463) 2020-11-19 10:12:06 -08:00
Monica Kozbial
7a048bdb47 Add tests to logic ternary block (#4427)
* Add tests to logic ternary block

* Fix lint
2020-11-18 14:21:56 -08:00
Monica Kozbial
dd0d5aee53 Adding procedure tests and handling procedures instantiated without name (#4428)
* Expand procedure tests and fix bug with default ids

* Add tests

* Remove xml_procedures_test.js and add non-overlapping test cases into procedures_test.js
2020-11-06 11:48:48 -08:00
Monica Kozbial
8361268c63 Refactor field_variable_tests to use dev-tools (#4417)
* Refactor field_variable_tests to use dev-tools
2020-11-06 11:35:00 -08:00