Skip to content
Snippets Groups Projects
Unverified Commit 8e28ebbe authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #3596 from paulkaplan/fix-sprite-library-tab-change

Pass onActivateBlocksTab to sprite library to switch tabs after adding.
parents 5c23bfe0 ed21909f
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ const TargetPane = ({
fileInputRef,
hoveredTarget,
spriteLibraryVisible,
onActivateBlocksTab,
onChangeSpriteDirection,
onChangeSpriteName,
onChangeSpriteRotationStyle,
......@@ -92,6 +93,7 @@ const TargetPane = ({
{spriteLibraryVisible ? (
<SpriteLibrary
vm={vm}
onActivateBlocksTab={onActivateBlocksTab}
onRequestClose={onRequestCloseSpriteLibrary}
/>
) : null}
......@@ -128,6 +130,7 @@ TargetPane.propTypes = {
hoveredSprite: PropTypes.string,
receivedBlocks: PropTypes.bool
}),
onActivateBlocksTab: PropTypes.func.isRequired,
onChangeSpriteDirection: PropTypes.func,
onChangeSpriteName: PropTypes.func,
onChangeSpriteRotationStyle: PropTypes.func,
......
......@@ -202,6 +202,7 @@ class TargetPane extends React.Component {
<TargetPaneComponent
{...componentProps}
fileInputRef={this.setFileInput}
onActivateBlocksTab={this.handleActivateBlocksTab}
onChangeSpriteDirection={this.handleChangeSpriteDirection}
onChangeSpriteName={this.handleChangeSpriteName}
onChangeSpriteRotationStyle={this.handleChangeSpriteRotationStyle}
......
......@@ -33,7 +33,7 @@ describe('Working with sprites', () => {
await clickXpath('//button[@aria-label="Choose a Sprite"]');
await clickText('Apple', scope.modal); // Closes modal
await rightClickText('Apple', scope.spriteTile); // Make sure it is there
await findByText('Motion'); // Make sure we are back to the code tab
await clickText('Motion'); // Make sure we are back to the code tab
const logs = await getLogs();
await expect(logs).toEqual([]);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment