-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add tests for per-block generators in field-colour #2220
Merged
rachel-fenichel
merged 10 commits into
google:blocks_for_fields
from
rachel-fenichel:tests_for_generators
Mar 5, 2024
Merged
feat: add tests for per-block generators in field-colour #2220
rachel-fenichel
merged 10 commits into
google:blocks_for_fields
from
rachel-fenichel:tests_for_generators
Mar 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rachel-fenichel
requested review from
maribethb
and removed request for
a team
February 23, 2024 19:22
maribethb
approved these changes
Feb 23, 2024
1 task
rachel-fenichel
added a commit
that referenced
this pull request
Mar 29, 2024
* feat: add unit tests for generators * fix: imports in tests * chore: format * feat: ignore golden files in plugin tests * chore: fix lint * feat: ignore golden files for linting * fix: revert addition of fs and path packages * fix: remove suite.only to make all tests run * chore: handle review feedback * fix: only import what you need in colour blocks
rachel-fenichel
added a commit
that referenced
this pull request
Apr 2, 2024
* feat: add unit tests for generators * fix: imports in tests * chore: format * feat: ignore golden files in plugin tests * chore: fix lint * feat: ignore golden files for linting * fix: revert addition of fs and path packages * fix: remove suite.only to make all tests run * chore: handle review feedback * fix: only import what you need in colour blocks
rachel-fenichel
added a commit
that referenced
this pull request
Apr 2, 2024
* feat: add unit tests for generators * fix: imports in tests * chore: format * feat: ignore golden files in plugin tests * chore: fix lint * feat: ignore golden files for linting * fix: revert addition of fs and path packages * fix: remove suite.only to make all tests run * chore: handle review feedback * fix: only import what you need in colour blocks
maribethb
pushed a commit
that referenced
this pull request
Apr 2, 2024
* feat!: add block definitions to colour field plugin (#2162) * feat: export functions to register some angle, colour, and multiline input fields * feat: add block definitions to colour and multiline input fields * feat: add block generators for the colour_picker block * fix: use Blockly.common.defineBlocksWithJsonArray * feat: add block generators for colour_random block * feat: add generators type and standardize exports for block files * chore: update to blockly@beta and fix types * chore: move all colour blocks to separate files and add more generator-related types * feat: finish adding block code generators for colour blocks * fix: PR feedback * fix: remove immediate registration of blocks and fields in field_colour * chore: use named imports and numbered TODOs * feat: add usage information about blocks to README * chore: revert changes outside of field_colour * chore: clean up tsdoc and exports * cgire: clean up README * chore: respond to PR feedback on names and comments * feat(tests): add and improve tests * chore(format): run formatter * fix: respond to PR feedback about names and file structure * fix: allow const variables to have UPPER_CASE names * fix: respond to PR feedback * chore: format * fix: line length * feat!: add block definition to multiline text field plugin (#2202) * chore: force-install blockly 10.4.0-beta.1 for development * feat: add text_multiline block and associated generators * feat: update test page to use new block and field * feat: README * chore: respond to PR feedback BREAKING CHANGE: The multiline text input field no longer registers itself on load. The developer must either manually register the field or install blocks, which will install the field. This is part of a move to have no side effects in field and block definitions, so that tree-shaking can remove unwanted fields and blocks. * chore: format (#2221) * feat!: Add registration function to field_angle and make it no longer install on file load (#2211) * feat!: Add registration function to field_angle and make it no longer install on file load * chore: formatting BREAKING CHANGE: The angle field no longer registers itself on load. The developer must manually register the field. This is part of a move to have no side effects in field and block definitions, so that tree-shaking can remove unwanted fields and blocks. * feat: add tests for per-block generators in field-colour (#2220) * feat: add unit tests for generators * fix: imports in tests * chore: format * feat: ignore golden files in plugin tests * chore: fix lint * feat: ignore golden files for linting * fix: revert addition of fs and path packages * fix: remove suite.only to make all tests run * chore: handle review feedback * fix: only import what you need in colour blocks * feat: add generator tests for the text_multiline block (#2232) * feat: add generator tests for the text_multiline block * fix: updated test string to include multiple types of quotes * fix: code style in generators for field colour blocks (#2233) * feat!: update blockly version to 10.4.3 for colour and multilineinput (#2296) * feat!: update blockly version to 10.4.3 for colour and multilineinput * chore!: update peer dependencies * chore: update package-lock.jsons * chore: fix dependencies
gonfunko
pushed a commit
to gonfunko/blockly-samples
that referenced
this pull request
Apr 15, 2024
* feat!: add block definitions to colour field plugin (google#2162) * feat: export functions to register some angle, colour, and multiline input fields * feat: add block definitions to colour and multiline input fields * feat: add block generators for the colour_picker block * fix: use Blockly.common.defineBlocksWithJsonArray * feat: add block generators for colour_random block * feat: add generators type and standardize exports for block files * chore: update to blockly@beta and fix types * chore: move all colour blocks to separate files and add more generator-related types * feat: finish adding block code generators for colour blocks * fix: PR feedback * fix: remove immediate registration of blocks and fields in field_colour * chore: use named imports and numbered TODOs * feat: add usage information about blocks to README * chore: revert changes outside of field_colour * chore: clean up tsdoc and exports * cgire: clean up README * chore: respond to PR feedback on names and comments * feat(tests): add and improve tests * chore(format): run formatter * fix: respond to PR feedback about names and file structure * fix: allow const variables to have UPPER_CASE names * fix: respond to PR feedback * chore: format * fix: line length * feat!: add block definition to multiline text field plugin (google#2202) * chore: force-install blockly 10.4.0-beta.1 for development * feat: add text_multiline block and associated generators * feat: update test page to use new block and field * feat: README * chore: respond to PR feedback BREAKING CHANGE: The multiline text input field no longer registers itself on load. The developer must either manually register the field or install blocks, which will install the field. This is part of a move to have no side effects in field and block definitions, so that tree-shaking can remove unwanted fields and blocks. * chore: format (google#2221) * feat!: Add registration function to field_angle and make it no longer install on file load (google#2211) * feat!: Add registration function to field_angle and make it no longer install on file load * chore: formatting BREAKING CHANGE: The angle field no longer registers itself on load. The developer must manually register the field. This is part of a move to have no side effects in field and block definitions, so that tree-shaking can remove unwanted fields and blocks. * feat: add tests for per-block generators in field-colour (google#2220) * feat: add unit tests for generators * fix: imports in tests * chore: format * feat: ignore golden files in plugin tests * chore: fix lint * feat: ignore golden files for linting * fix: revert addition of fs and path packages * fix: remove suite.only to make all tests run * chore: handle review feedback * fix: only import what you need in colour blocks * feat: add generator tests for the text_multiline block (google#2232) * feat: add generator tests for the text_multiline block * fix: updated test string to include multiple types of quotes * fix: code style in generators for field colour blocks (google#2233) * feat!: update blockly version to 10.4.3 for colour and multilineinput (google#2296) * feat!: update blockly version to 10.4.3 for colour and multilineinput * chore!: update peer dependencies * chore: update package-lock.jsons * chore: fix dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Pre-work for #2198, by making it possible to test that changes to generators are safe.
Proposed Changes
Add generator tests to field colour.
The test:
Reason for Changes
Verify that generators are the same after moving them from core to samples. This is primarily change detection, and will help with later cleanup of generator functions (#2198).
Test Coverage
Added tests in `plugins/field-colour/test/blocks-test.mocha
Documentation
None