Commit Graph

405 Commits

Author SHA1 Message Date
Neil Fraser
52b6ce18a5 Fix unit tests 2019-07-08 13:29:43 -07:00
alschmiedt
dfd393ae41 Remove typo 2019-07-01 16:29:19 -07:00
alschmiedt
e75628bf9d Properly tear down tests 2019-07-01 14:46:46 -07:00
Beka Westberg
b34ca2f93b Fixed review comments. 2019-06-25 15:08:01 -07:00
Beka Westberg
347519b2a1 Added all block files to mocha index. 2019-06-25 15:08:01 -07:00
Beka Westberg
427291c05d Added skipping bad variable test. 2019-06-25 15:08:01 -07:00
Beka Westberg
2620a5092e Added message.js to mocha tests file. 2019-06-25 15:08:01 -07:00
Beka Westberg
942c7c2a38 Deleted inaccurate jsunit procedure tests. 2019-06-25 15:08:01 -07:00
Beka Westberg
85c4e4129f Added procedure tests. 2019-06-25 15:08:01 -07:00
Beka Westberg
5a4cc7ae12 Removed textToDom Needing <xml> Documents (#2585)
* Removed textToDom needing <xml> documents.

* Fixed jsdoc.

* Followon changes resulting from lack of XML tag.

* Fix Mocha test.
2019-06-24 15:50:06 -07:00
Beka Westberg
69e2eae218 Fixed setTooltip not working before appendField(). (#2578) 2019-06-21 13:36:25 -07:00
Beka Westberg
2463a754db Updated TODO's. 2019-06-12 18:36:50 -07:00
Beka Westberg
406c6aca76 Changed sendDeleteEvent to append <xml> tags. Fixed bad <next> tests. 2019-06-12 18:25:44 -07:00
Beka Westberg
6665e46cd1 Removed test cases that never actually occure. 2019-06-12 18:12:19 -07:00
Beka Westberg
d05ce11736 Added trashcan tests. 2019-06-11 15:24:58 -07:00
Beka Westberg
81035c3bcb Fixed unit tests. 2019-06-11 13:32:10 -07:00
Neil Fraser
775ce34eac Simplify workspace.getBlocksBoundingBox
Previously it returned x,y,width,height.  Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers.

This commit makes the minumum change to the metrics_test.  I’m happy to change the test’s data if that makes more sense.
2019-06-07 10:32:57 -07:00
Neil Fraser
1905531824 Fix Mocha tests. 2019-06-07 10:32:57 -07:00
Neil Fraser
d1a29739d8 Move utilities into own directory.
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Neil Fraser
a18aa76e67 Update colour tests
Blockly now normalizes colours lowercase.
2019-06-05 16:41:04 -07:00
Beka Westberg
f0d6fbd192 Reorganized field view initialization. 2019-05-31 10:38:18 -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
alschmiedt
ea3c483e51 Merge pull request #2517 from BeksOmega/feature/DateDropdownDiv
Moved the Date Field to the Dropdown Div, and Restyled It
2019-05-30 13:06:02 -07:00
Neil Fraser
459961c3cb Replace Element constants with Node constants.
Element constants apparently don’t exist in IE or Edge.  Node constants apparently do.
2019-05-29 10:45:54 -07:00
Beka Westberg
4d9c0f01f5 Moved the date field to the dropdown div, and restyled it. 2019-05-28 15:32:20 -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
Neil Fraser
5c614d73c1 Add tests for XY regexs. 2019-05-24 15:45:05 -07:00
Beka Westberg
f16c9c0beb Refactored field validation. 2019-05-24 14:23:42 -07:00
Neil Fraser
5cf52c566a Fix a dozen compiler warnings. 2019-05-17 16:48:40 -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
Beka Westberg
354d402c49 Refactored field.init into field.initView and field.initModel 2019-05-03 07:12:46 -07:00
Rachel Fenichel
12a769b9c4 Merge pull request #2426 from rachel-fenichel/testing/run_mocha_tests
Add mocha tests to npm test
2019-05-02 15:32:09 -07:00
Rachel Fenichel
9e7becc262 Update comments 2019-05-02 15:31:54 -07:00
Beka Westberg
3afcd23535 Removed explicitly setting variable type to two single quotes. 2019-05-01 14:31:20 -07:00
Rachel Fenichel
99dc9bb38f Fix test (matching fix in jsunit tests) 2019-05-01 14:19:55 -07:00
Rachel Fenichel
e77efa6c13 Add mocha tests + parsing to npm test 2019-05-01 13:43:19 -07:00
Rachel Fenichel
5983c3c4b7 Merge pull request #2424 from rachel-fenichel/testing/webdriverio_upgrade
Update to webdriverio v5; fix resulting test breakages
2019-05-01 10:55:40 -07:00
Rachel Fenichel
da2a89e177 Update to webdriverio v5; fix resulting test breakages 2019-04-30 14:38:33 -07:00
Beka Westberg
247aafae7e Added updateColour to field. 2019-04-29 16:53:59 -07:00
Beka Westberg
ce816b93bf Added field_label_serializable. (#2399) 2019-04-24 10:43:09 -07:00
Jim Jiang
1b10d134a5 Add Block.setEnabled (#2386)
* Implement Block.setEnabled()

From issue #1593. This commit:
- add setEnabled
- deprecate setDisabled

* Update setDisabled calls to setEnabled

Add setEnabled and deprecate setDisabled in
- core/block_svg

Update calls in
- blocks/loops
- blocks/procedures
- core/block_events
- core/events
- core/flyout_base
- core/xml
- tests/workplace_svg/procedure_svg_test

* Implement changes from comments from RoboErikG

- Implement isEnabled()
- Make this.disabled @private
- Make setDisabled(disabled) call setEnabled(!disabled)
- Update setEnabled to use isEnabled()

* Utilize isEnabled() and fix typos

Fix missing parentheses
Implement isEnabled() more widely
Fix lint and parentheses errors

* Change prevDisabledState to prevEnabledState
2019-04-23 08:49:07 -07:00
Beka Westberg
148823146d Fixed lint errors 2019-04-22 10:55:36 -07:00
Beka Westberg
91b0e3d79a Changed mocha eslint config to extend root eslint config. 2019-04-22 10:45:35 -07:00
Beka Westberg
e8573bc0db Added isSerializable function and SERIALIZABLE property to fields. 2019-04-21 08:28:37 -07:00
Beka Westberg
0617cc7fea Added isDirty_ property to fields. 2019-04-15 16:37:11 -07:00
RoboErikG
ec78eeb39b Propagate the visible state when blocks connect (#2003)
* Propagate the visible state when blocks connect

This fixes #1967.

In rendered connections when connecting:
- If the superior connection is hidden this hides the newly connected block.
- If the superior connection isn't hidden it makes sure the block is visible.

In rendered connections when disconnecting:
- If the superior connection is hidden, make the disconnected block stack visible.

TODO before review:
 - write tests.
 - update collapsed message

* Add missing overrides

* Add tests for hidden connections and fix a bug while disposing
2019-04-15 16:23:19 -07:00
Beka Westberg
f88c704d69 Fixed visible floating point errors in number fields. (#2384) 2019-04-15 13:26:20 -07:00
Neil Fraser
9561ecffa6 Common prefix for test blocks
Fixes #2103.

This will break any saved XML involving the playground’s test blocks.  I don’t think any such XML exists on this planet.
2019-04-05 16:03:43 -07:00
alschmiedt
d3f8464876 Fixes test case for unplug 2019-04-02 16:45:43 -07:00