Skip to content

Commit

Permalink
🏷️ Fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Mar 24, 2021
1 parent dc23bc7 commit d0afe67
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ describe('ConfigPanel', () => {

describe('focus behavior when adding or removing layers', () => {
it('should focus the only layer when resetting the layer', () => {
const component = mountWithIntl(<LayerPanels {...getDefaultProps()} />, {
attachTo: container,
});
const component = mountWithIntl(
<LayerPanels {...getDefaultProps()} />,
// @ts-expect-error
{ attachTo: container }
);
const firstLayerFocusable = component
.find(LayerPanel)
.first()
Expand All @@ -144,7 +146,11 @@ describe('ConfigPanel', () => {
first: mockDatasource.publicAPIMock,
second: mockDatasource.publicAPIMock,
};
const component = mountWithIntl(<LayerPanels {...defaultProps} />, { attachTo: container });
const component = mountWithIntl(
<LayerPanels {...defaultProps} />,
// @ts-expect-error
{ attachTo: container }
);
const secondLayerFocusable = component
.find(LayerPanel)
.at(1)
Expand All @@ -165,7 +171,11 @@ describe('ConfigPanel', () => {
first: mockDatasource.publicAPIMock,
second: mockDatasource.publicAPIMock,
};
const component = mountWithIntl(<LayerPanels {...defaultProps} />, { attachTo: container });
const component = mountWithIntl(
<LayerPanels {...defaultProps} />,
// @ts-expect-error
{ attachTo: container }
);
const firstLayerFocusable = component
.find(LayerPanel)
.first()
Expand All @@ -187,9 +197,11 @@ describe('ConfigPanel', () => {
}
});

const component = mountWithIntl(<LayerPanels {...getDefaultProps()} dispatch={dispatch} />, {
attachTo: container,
});
const component = mountWithIntl(
<LayerPanels {...getDefaultProps()} dispatch={dispatch} />,
// @ts-expect-error
{ attachTo: container }
);
act(() => {
component.find('[data-test-subj="lnsLayerAddButton"]').first().simulate('click');
});
Expand Down

0 comments on commit d0afe67

Please sign in to comment.