Commit Graph

29 Commits

Author SHA1 Message Date
Monica Kozbial
40ef586260 Refactoring Ui events in core (#4418)
* Ui events base (#4370)

* Add constants for new ui event types

* Add property to indicate an event as UI event

* Click events (#4372)

* Creating new ui base class.

* Refactor theme event (#4391)

* Add themeName property to theme event

* Refactor marker move events. (#4389)

* Refactor trashcan open event (#4392)

* Refactor selected event (#4387)

* Refactor toolbox item change event (#4394)

* Refactor bubble open events (#4390)

* Refactor block drag event (#4388)

* Viewport events (#4395)

* Fix event filtering for ui events (#4401)

* Move events to new directory and rename Ui events base (#4400)

* Move events to new directory and rename Ui events base

* Add missing fromJson implementation for click event (#4410)

* Adding serialization tests for events

* Zoom controls event (#4407)

* Refactor zoom event

* Rename IS_UI_EVENT to isUiEvent
2020-11-04 14:43:54 -08:00
Maribeth Bottorff
4ea112fcd3 Don't undo the change events from disableOrphans (#4304) 2020-09-25 11:46:29 -07:00
Maribeth Bottorff
6017a953d1 Fix bugs related to events firing during block create (#4278)
Fix bugs related to events firing during block create and add test for expected block init behavior
2020-09-15 20:02:07 -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
Beka Westberg
c732484180 Add programmatically setting shadows Take 2 (#4215)
* Add programmatically setting shadows
2020-09-08 08:50:01 -07:00
Monica Kozbial
61bdbc5034 Fixing issues with workspace dispose in event tests. (#4211)
* Fixing issues with workspace dispose in event tests.
2020-08-31 16:35:36 -07:00
Monica Kozbial
f849f8801d Minor stub and assert cleanup (#4185)
* Fix order or assert equal arguments.

* Replace usages of callsFake with returns where appropriate
2020-08-20 11:07:32 -07:00
Monica Kozbial
afd10cb3a2 Fix workspace cleanup in tests. (#4169) 2020-08-19 15:40:12 -07:00
Monica Kozbial
332ff10672 Test gesture triggered events and event assertion refactor (#4155)
* Refactor event assertion helpers and add assertions to gesture test.
2020-08-12 13:27:37 -07:00
Monica Kozbial
b69f59eae7 Cleanup of chai asserts (#4100) 2020-08-05 16:03:06 -07:00
Monica Kozbial
b7305c1eed Shared events cleanup (#4092)
* Remove temp fix for event queue cleanup.

* Implementing shared setup and cleanup.

* Remove unecessary restore and add comment.

* Adds helper for workspace teardown

* Remove unecessary restore calls in event tests
2020-08-03 16:50:23 -07:00
Sam El-Husseini
51bbc2d9bb Move events into the global registry (#4053)
* Move events into the global registry
2020-08-03 08:11:58 -07:00
Monica Kozbial
3868db3221 Refactor shared (#4066)
* Refactoring event helpers.

* Fix concurrent test failure.
2020-07-24 14:49:39 -07:00
alschmiedt
a23d2fb9d0 Remove assertArrayEquals (#3951) 2020-06-10 10:25:59 -07:00
Monica Kozbial
e3d82fa3af Converting procedure svg tests to mocha. (#3867)
* Converting procedure svg tests to mocha.

* Removing unused function.

* cleanup
2020-04-29 11:33:11 -07:00
Monica Kozbial
c35793bf9c Convert event svg tests to mocha. (#3864) 2020-04-29 11:16:45 -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
a74cd0898c Converting variable map tests to mocha. (#3827)
* Converting variable map tests to mocha.

* Removing TODO updating chai syntax.
2020-04-16 17:47:17 -07:00
Monica Kozbial
ab5f7d8a00 Converting event tests to mocha. (#3811)
* Convert remaining jsunit tests for events to mocha.

* Fix eslint.
2020-04-15 11:29:17 -07:00
Monica Kozbial
e0521265b2 Fixing event tests and removing duplicate tests. (#3810) 2020-04-14 13:22:06 -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
57868e7e83 Remove all calls to goog.math (#2739)
* Replace calls to goog.math.Size and goog.math.Coordinate with Blockly equivelants
2019-07-30 11:22:08 -07:00
Beka Westberg
148823146d Fixed lint errors 2019-04-22 10:55:36 -07:00
Rachel Fenichel
089c30baa1 Add eslintrc to mocha directory 2019-01-09 13:31:07 -08:00
Rachel Fenichel
298b93c025 Fix eslint errors with in-file comments 2019-01-08 11:54:57 -08:00
Rachel Fenichel
ecb8b4fb44 Remove dependenceis and use unpkg 2019-01-08 11:41:57 -08:00
Rachel Fenichel
35f05ce582 Skip two broken test suites 2019-01-08 11:31:35 -08:00
Rachel Fenichel
1c413f0442 More testing with mocha 2019-01-08 11:31:35 -08:00