Skip to content

Commit

Permalink
fixed visibility of edit flyout
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Oct 30, 2020
1 parent e33ca7a commit 4f35e3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ describe('ConfigureCases', () => {
wrapper = mount(<ConfigureCases userCanCrud />, { wrappingComponent: TestProviders });
});

test('it renders the ConnectorEditFlyout', () => {
expect(wrapper.find(ConnectorEditFlyout).exists()).toBeTruthy();
});

test('it renders with correct props', () => {
// Connector
expect(wrapper.find(Connectors).prop('connectors')).toEqual(connectors);
Expand All @@ -174,8 +170,7 @@ describe('ConfigureCases', () => {

// Flyouts
expect(wrapper.find(ConnectorAddFlyout).exists()).toBe(false);
expect(wrapper.find(ConnectorEditFlyout).exists()).toBe(true);
expect(wrapper.find(ConnectorEditFlyout).prop('initialConnector')).toEqual(connectors[0]);
expect(wrapper.find(ConnectorEditFlyout).exists()).toBe(false);
});

test('it disables correctly when the user cannot crud', () => {
Expand Down Expand Up @@ -528,6 +523,7 @@ describe('user interactions', () => {
wrapper.update();

expect(wrapper.find(ConnectorEditFlyout).exists()).toBe(true);
expect(wrapper.find(ConnectorEditFlyout).prop('initialConnector')).toEqual(connectors[1]);
expect(
wrapper.find('[data-test-subj="case-configure-action-bottom-bar"]').exists()
).toBeFalsy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ const ConfigureCasesComponent: React.FC<ConfigureCasesComponentProps> = ({ userC
setEditedConnectorItem(
normalizeCaseConnector(connectors, connector) as ActionConnectorTableItem
);
setEditFlyoutVisibility(true);
}
}, [connectors, connector, isLoadingConnectors]);

Expand Down

0 comments on commit 4f35e3f

Please sign in to comment.