Device manager - add tooltip to device details toggle (#9594)
* add hide/show tooltip to dm details toggle * use named export, update tests
This commit is contained in:
parent
acdcda78f0
commit
caac059479
11 changed files with 29 additions and 23 deletions
|
@ -17,7 +17,9 @@ limitations under the License.
|
|||
import React from 'react';
|
||||
import { fireEvent, render } from '@testing-library/react';
|
||||
|
||||
import DeviceExpandDetailsButton from '../../../../../src/components/views/settings/devices/DeviceExpandDetailsButton';
|
||||
import {
|
||||
DeviceExpandDetailsButton,
|
||||
} from '../../../../../src/components/views/settings/devices/DeviceExpandDetailsButton';
|
||||
|
||||
describe('<DeviceExpandDetailsButton />', () => {
|
||||
const defaultProps = {
|
||||
|
|
|
@ -221,7 +221,7 @@ describe('<FilteredDeviceList />', () => {
|
|||
|
||||
act(() => {
|
||||
const tile = getByTestId(`device-tile-${hundredDaysOld.device_id}`);
|
||||
const toggle = tile.querySelector('[aria-label="Toggle device details"]');
|
||||
const toggle = tile.querySelector('[aria-label="Show details"]');
|
||||
fireEvent.click(toggle as Element);
|
||||
});
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
|
|||
class="mx_DeviceTile_actions"
|
||||
>
|
||||
<div
|
||||
aria-label="Toggle device details"
|
||||
aria-label="Show details"
|
||||
class="mx_AccessibleButton mx_DeviceExpandDetailsButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_icon"
|
||||
data-testid="current-session-toggle-details"
|
||||
role="button"
|
||||
|
@ -380,7 +380,7 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
|
|||
class="mx_DeviceTile_actions"
|
||||
>
|
||||
<div
|
||||
aria-label="Toggle device details"
|
||||
aria-label="Show details"
|
||||
class="mx_AccessibleButton mx_DeviceExpandDetailsButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_icon"
|
||||
data-testid="current-session-toggle-details"
|
||||
role="button"
|
||||
|
|
|
@ -4,7 +4,7 @@ exports[`<DeviceExpandDetailsButton /> renders when expanded 1`] = `
|
|||
{
|
||||
"container": <div>
|
||||
<div
|
||||
aria-label="Toggle device details"
|
||||
aria-label="Hide details"
|
||||
class="mx_AccessibleButton mx_DeviceExpandDetailsButton mx_DeviceExpandDetailsButton_expanded mx_AccessibleButton_hasKind mx_AccessibleButton_kind_icon"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
@ -21,7 +21,7 @@ exports[`<DeviceExpandDetailsButton /> renders when not expanded 1`] = `
|
|||
{
|
||||
"container": <div>
|
||||
<div
|
||||
aria-label="Toggle device details"
|
||||
aria-label="Show details"
|
||||
class="mx_AccessibleButton mx_DeviceExpandDetailsButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_icon"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue