diff --git a/src/components/InventoryTable/TitleColumn.js b/src/components/InventoryTable/TitleColumn.js index 3e1e86d05..83e956a9f 100644 --- a/src/components/InventoryTable/TitleColumn.js +++ b/src/components/InventoryTable/TitleColumn.js @@ -1,6 +1,6 @@ /* eslint-disable react/prop-types */ import React from 'react'; -import Link from '@redhat-cloud-services/frontend-components/InsightsLink'; +import { Link } from 'react-router-dom'; /** * Helper function to proprly calculate what to do when user clicks on first cell. @@ -39,9 +39,8 @@ const TitleColumn = ({ children, id, item, ...props }) => ( children ) : ( { diff --git a/src/components/InventoryTable/TitleColumn.test.js b/src/components/InventoryTable/TitleColumn.test.js index b44371be8..87983264c 100644 --- a/src/components/InventoryTable/TitleColumn.test.js +++ b/src/components/InventoryTable/TitleColumn.test.js @@ -4,7 +4,7 @@ import { act, fireEvent, render } from '@testing-library/react'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), - Link: ({ children, ...props }) => {children}, // eslint-disable-line + Link: ({ children, ...props }) => {children}, // eslint-disable-line })); describe('TitleColumn', () => { @@ -40,6 +40,16 @@ describe('TitleColumn', () => { expect(asFragment()).toMatchSnapshot(); }); + it('should render correctly with to', () => { + const { asFragment } = render( + + something + + ); + + expect(asFragment()).toMatchSnapshot(); + }); + it('should render correctly no detail with data', () => { const { asFragment } = render( @@ -42,6 +42,7 @@ exports[`TitleColumn should render correctly with data 1`] = ` class="" > something @@ -60,7 +61,8 @@ exports[`TitleColumn should render correctly with href 1`] = ` class="" > something @@ -81,6 +83,7 @@ exports[`TitleColumn should render correctly with os_release 1`] = ` class="" > something @@ -89,3 +92,22 @@ exports[`TitleColumn should render correctly with os_release 1`] = ` `; + +exports[`TitleColumn should render correctly with to 1`] = ` + +
+
+ + something + +
+
+ +`;