-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
chore: clean up mutator tests #7434
chore: clean up mutator tests #7434
Conversation
tests/browser/test/mutator_test.js
Outdated
suiteSetup(async function () { | ||
this.browser = await testSetup(testFileLocations.PLAYGROUND); | ||
}); | ||
|
||
test('This test mutating a block creates more inputs', async function () { | ||
await testingMutator(this.browser, screenDirection.LTR); | ||
test.only('Mutating a block creates more inputs', async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove only
.
tests/browser/test/test_setup.js
Outdated
if (mutatorBlockId) { | ||
draggedLocation = await getLocationOfBlockConnection( | ||
browser, | ||
draggedBlock, | ||
draggedBlock.id, | ||
draggedConnection, | ||
mutatorBlockId, | ||
); | ||
targetLocation = await getLocationOfBlockConnection( | ||
browser, | ||
targetBlock, | ||
targetBlock.id, | ||
targetConnection, | ||
mutatorBlockId, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this else and just always pass mutatorBlockId
(which may be undefined).
core/flyout_base.ts
Outdated
@@ -1214,6 +1214,8 @@ export abstract class Flyout extends DeleteArea implements IFlyout { | |||
|
|||
// Clone the block. | |||
const json = blocks.save(oldBlock) as blocks.State; | |||
// TODO: Add a saveIds parameter to `save`. | |||
json['id'] = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to revert this change because I don't want to half-fix the issue.
This reverts commit dfec88a.
The basics
The details
Resolves
Fixes N/A
Follow on to #7423 that fixes up the mutator tests.
Proposed Changes
connect
method to not need to take in the element selector.Reason for Changes
All of these things are to aid in readability.
Changes to the
connect
method also involved partially fixing #7432, so we may want to delay those changes for now since they're not complete.Test Coverage
This is tests!
Documentation
N/A
Additional Information
N/A
](https://github.com/google/blockly/pull/7393/files)