Commit Graph

164 Commits

Author SHA1 Message Date
Neil Fraser 31a9c02362 Stop generating dynamic XML from text.
Removes last goog.string reference.
2019-07-15 14:37:27 -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
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 942c7c2a38 Deleted inaccurate jsunit procedure tests. 2019-06-25 15:08:01 -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 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
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
Rachel Fenichel da2a89e177 Update to webdriverio v5; fix resulting test breakages 2019-04-30 14:38:33 -07:00
alschmiedt d3f8464876 Fixes test case for unplug 2019-04-02 16:45:43 -07:00
Neil Fraser 8254e2aa22 Failing unit tests no longer show useful info. 2019-03-29 15:24:37 -07:00
alschmiedt c7b748c4d1 Merge pull request #2270 from alschmiedt/changeStyleNames
Changes colour names
2019-02-06 15:35:59 -08:00
alschmiedt 58c365e377 Changes colour names 2019-02-06 14:24:41 -08:00
alschmiedt 99f4f48321 Fix event description for theme 2019-02-05 13:43:54 -08:00
Rachel Fenichel 71e91534e8 Update connection_db_test 2019-02-04 08:59:55 -08:00
alschmiedt caf664db04 Small fixes 2019-01-09 15:38:30 -08:00
alschmiedt f480b1ff79 Changes Blockly style to be Blockly theme. 2019-01-08 11:40:57 -08:00
alschmiedt 1b3955d9d6 Fixing review comments 2018-12-21 07:52:50 -08:00
alschmiedt 8544491228 Small fixes 2018-12-19 09:53:54 -08:00
alschmiedt 692555cf1c Fixes broken set_style test 2018-12-18 13:58:09 -08:00
alschmiedt 4918da9538 Adds ability to provide a hue value for primary colour 2018-12-12 11:39:23 -08:00
alschmiedt fbd44c80f9 Adds tests for adding blockly styles 2018-12-11 13:25:53 -08:00
Rachel Fenichel 6169a6488f Merge pull request #2139 from rachel-fenichel/bugfix/2107
Bugfix/2107
2018-11-27 13:57:10 -08:00
Rachel Fenichel 9ed9dd2f08 Add tests 2018-11-27 13:48:23 -08:00
alschmiedt 76538e67e7 Merge pull request #2133 from alschmiedt/single_code_block
Generate Code For Single Block
2018-11-27 13:38:20 -08:00
alschmiedt d64b6fe9e0 Changes function name 2018-11-27 13:31:32 -08:00
alschmiedt e9773be499 Adds tests for a nested loop and disabled block 2018-11-27 09:32:48 -08:00
alschmiedt 6366d7be24 Tests blockToCode function for all generators 2018-11-21 11:45:25 -08:00
Rachel Fenichel 13740f4c84 Add tests for canConnectToPrevious 2018-11-19 14:50:00 -08:00
Rachel Fenichel 53d8ac8b0b Prefer inserting to wrapping for c-shape blocks 2018-11-19 11:16:03 -08:00
Rachel Fenichel 17823db4df Fix problem with connecting a statement into a stack, but not a c-shape block 2018-11-14 11:22:57 -08:00
Neil Fraser 8d70598b6b Recompile due to changed dependencies. 2018-10-16 11:34:10 -07:00
Rachel Fenichel 341865c80c Merge pull request #1995 from rachel-fenichel/feature/unplug_horizontal
Heal rows when unplugging, and add tests
2018-08-06 11:28:12 -07:00
Rachel Fenichel b89487e332 Ignore whether parent has multiple inputs 2018-08-06 11:18:00 -07:00
Neil Fraser c6afb08c4b Add unit tests and code cleanup to utils (#1993)
* Add unit tests for new util functions
* Utils functions shouldn’t be package, not private.
* Use existing utility function for insertAfter
2018-08-03 14:31:50 -07:00
Rachel Fenichel b65491e656 Heal rows when unplugging, and add tests 2018-08-03 13:54:29 -07:00
Rachel Fenichel b52267bee9 Tests for block.unplug 2018-08-02 17:35:10 -07:00
RoboErikG 61803167d8 Add test for deleting a rendered block with a comment (#1984)
Disabled for now as it fails due to #1960.
2018-07-23 10:56:37 -07:00
Rachel Fenichel 3c6a29c705 Move a test function into utils 2018-06-07 16:58:58 -07:00
Rachel Fenichel 7b29ea9bf3 Add some workspace comment tests 2018-06-06 17:12:23 -07:00
Rachel Fenichel 1f9c0d0e95 Add a comment with some context on this test. 2018-05-25 10:38:55 -07:00
Rachel Fenichel e6a875bb02 Make event filtering stricter for events 2018-05-24 17:12:00 -07:00
Andrew n marshall 9b8704f4bc Adding travis_fold logging around each test (#1879)
Replace individual .travis.yml commands and test_runner.js with tests/run_all_tests.sh, which manages the travis_fold statements and accumulating the output of all the test phases.

This script is now in charge of test_setup.sh (previously handled by npm pretest script). It also adds green/red color coding to each test section, based on success and failure.
2018-05-22 17:23:01 -07:00
Rachel Fenichel 02aada1e3d Make ui events work when block is null; test 2018-05-03 17:36:08 -07:00
Andrew n marshall 0ffd5dda18 Changing root script for tests under Node. (#1837)
* Changing root script for tests under Node.

Was: tests/jsunit/test_runner.js
Now: tests/test_runner.js

The webdriver & jsunit calls formerly in tests/jsunit/test_runner.js
are now in function runJsUnitTestsInBrowser, in
run_jsunit_tests_in_browser.js, called from tests/test_runner.js.

This makes room for additional tests under Node, such as headless and generator tests.
2018-05-02 12:19:49 -07:00
Rachel Fenichel ee6f2ea097 Comments v3 (#1817)
* Add skeleton for workspace comments

* XML parsing and encoding of workspace comments.

* Minor fix: piping the height and width from xml to newWorkspaceComment

* Move height and width into workspace_comment_svg

* rename newWorkspaceComment to newComment

* minor refactoring. PR changes

* Functions for managing the comment's lifecycle

* Add initial tests

* Add another test

* Add basic rendering of a comment.

* Cleanup remaining highlighting steps from render

* Fix lint

* Fix aslant

* Add basic comment translate

* Simplify render code into one setPath method

* Move steps to setPath_

* Remove svg elements when disposing of a comment; some code cleanup

* Add a workspace comment on context menu click and position it where the initial context menu was clicked.

* Minor rendering changes, fixes RTL. Fix positioning of new (context menu) comments while workspace is scaled.

* PR feedback

* Gesture code for dragging comments

* Add comment (block drag) surface methods

* minor comment fix

* Comment fixes

* Add comment dragger

* Making rendered private

* Require CommentDragger

* Make basic comment dragging work

* Increase the border around the comment to make a bigger drag handle

* Remove typo

* Allow comments to be selected. Highlight selected comment. Only edit comment on click. Updated comment rendering.

* minor refactor: remove commented out code

* PR comments

* lint and rebuild

* Fix renamed function call

* Fix workspace getMetrics by storing comment size as a number, not a string

* Enable comment deletion when dragging over the toolbox or trash can

* Give issue references to some todos

* Create a helper function for workspace comment creation

* Integrate sam's workspace comments, using the bubble dragger

* Remove comment_dragger references

* Remove comment dragger.js

* Remove pointer handling

* Fix lint

* Move comment XML functions into the comment files.

* Fix tests

* Fix type annotations

* Fix comments on comments

* Fix compiler errors related to visibility.

* Fix merge issues and add an issue number to a TODO

* Add a new message for default text on workspace comments, and rebuild

* Add support for a context menu on workspace comment showing delete and duplication options.
Add copy and paste support.

* PR comment feedback

* Show a delete icon on the comment when selected. Delete icon deletes the comment. Comment can be deleted if dragged onto the toolbox or the trash icon. A normal bubble cannot be deleted that way.

* use isDeletable instead

* Support drag of the comment during editing mode using the top handle.

* Add skeletons for all workspace comment events

* Rebuild with new comments

* Get rid of confused TODO

* JSDoc on a function

* Fix broken tests

* More PR feedback

* Fix lint

* Delete comment on mouse out, highlight on mouse down.

* Fix lint.

* Show delete hand cursor when dragging a comment to delete over the toolbox

* Focus textarea on select

* Add delete events

* Remove workspace comment create event, and add TODO placeholder

* Provide default values if comment height and width are missing in XML

* Set comment handle fill to none by default

* Rebuild

* Comment de/serialization should include location.

* Add comment move events, with undo and redo

* Add comment change events

* Move files up to core

* Add package/private annotations wherever possible

* Move the workspace comment events up to core and into a single file

* Mark things package or private where possible

* Get rid of unnecessary changes to messge files

* Fix lint

* Fix some review feedback

* Make changes to the comment db happen in addTopComment and removeTopComment

* Add css classes for toggling comment focus

* Clean up css for comment focus

* Rebuild
2018-04-27 15:18:59 -07:00