Device manager - hide unverified security recommendation when only current session is unverified (PSG-639) (#9228)
* scroll to filtered list from security recommendations * test sessionmanager scroll to * stable snapshot * fix strict errors * prtidy * dont show security rec section when only curent session is unverified
This commit is contained in:
parent
219f4fae3d
commit
85f92308f9
3 changed files with 24 additions and 2 deletions
|
@ -34,6 +34,7 @@ describe('<SecurityRecommendations />', () => {
|
|||
const defaultProps = {
|
||||
devices: {},
|
||||
goToFilteredList: jest.fn(),
|
||||
currentDeviceId: 'abc123',
|
||||
};
|
||||
const getComponent = (props = {}) =>
|
||||
(<SecurityRecommendations {...defaultProps} {...props} />);
|
||||
|
@ -53,6 +54,16 @@ describe('<SecurityRecommendations />', () => {
|
|||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('does not render unverified devices section when only the current device is unverified', () => {
|
||||
const devices = {
|
||||
[unverifiedNoMetadata.device_id]: unverifiedNoMetadata,
|
||||
[verifiedNoMetadata.device_id]: verifiedNoMetadata,
|
||||
};
|
||||
const { container } = render(getComponent({ devices, currentDeviceId: unverifiedNoMetadata.device_id }));
|
||||
// nothing to render
|
||||
expect(container.firstChild).toBeFalsy();
|
||||
});
|
||||
|
||||
it('renders inactive devices section when user has inactive devices', () => {
|
||||
const devices = {
|
||||
[verifiedNoMetadata.device_id]: verifiedNoMetadata,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue