Pass onActivateBlocksTab to sprite library to switch tabs after adding.

I forgot that the integration test needs to try clicking, because finding text will find invisible text as well
This commit is contained in:
Paul Kaplan committed 2018-11-01 11:07:34 -04:00
1 parent 5c23bfe0fd
commit ed21909f07
3 files changed
+5 -1

No files matched your search

@@ -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,
+1
View File
@@ -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}
+1 -1
View File
@@ -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([]);
});