Device manager - device tile main click target (#9409)
* change device tile click to toggle details instead of selection * lint * test current device section click * stuck cypress
This commit is contained in:
@@ -30,6 +30,7 @@ describe('<SelectableDeviceTile />', () => {
|
||||
deviceType: DeviceType.Unknown,
|
||||
};
|
||||
const defaultProps = {
|
||||
onSelect: jest.fn(),
|
||||
onClick: jest.fn(),
|
||||
device,
|
||||
children: <div>test</div>,
|
||||
@@ -48,15 +49,15 @@ describe('<SelectableDeviceTile />', () => {
|
||||
expect(container.querySelector(`#device-tile-checkbox-${device.device_id}`)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('calls onClick on checkbox click', () => {
|
||||
const onClick = jest.fn();
|
||||
const { container } = render(getComponent({ onClick }));
|
||||
it('calls onSelect on checkbox click', () => {
|
||||
const onSelect = jest.fn();
|
||||
const { container } = render(getComponent({ onSelect }));
|
||||
|
||||
act(() => {
|
||||
fireEvent.click(container.querySelector(`#device-tile-checkbox-${device.device_id}`));
|
||||
});
|
||||
|
||||
expect(onClick).toHaveBeenCalled();
|
||||
expect(onSelect).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('calls onClick on device tile info click', () => {
|
||||
|
||||
Reference in New Issue
Block a user