1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

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:
Kerry
2022-10-14 13:43:20 +02:00
committed by GitHub
parent 77543b32d4
commit 17fce6ccb2
14 changed files with 69 additions and 22 deletions

View File

@@ -67,6 +67,23 @@ describe('<CurrentDeviceSection />', () => {
expect(container).toMatchSnapshot();
});
it('displays device details on main tile click', () => {
const { getByTestId, container } = render(getComponent({ device: alicesUnverifiedDevice }));
act(() => {
fireEvent.click(getByTestId(`device-tile-${alicesUnverifiedDevice.device_id}`));
});
expect(container.getElementsByClassName('mx_DeviceDetails').length).toBeTruthy();
act(() => {
fireEvent.click(getByTestId(`device-tile-${alicesUnverifiedDevice.device_id}`));
});
// device details are hidden
expect(container.getElementsByClassName('mx_DeviceDetails').length).toBeFalsy();
});
it('displays device details on toggle click', () => {
const { container, getByTestId } = render(getComponent({ device: alicesUnverifiedDevice }));