mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
categories search link on asset details, test fix
This commit is contained in:
parent
7fc99699c7
commit
92721702a0
@ -46,8 +46,9 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
</span>
|
||||
|
||||
{base.categories && (
|
||||
// TODO: Make this link to search for respective category
|
||||
<Link to={`/search?text=${base.categories[0]}`}>
|
||||
<Link
|
||||
to={`/search?categories=${base.categories[0]}`}
|
||||
>
|
||||
{base.categories[0]}
|
||||
</Link>
|
||||
)}
|
||||
|
@ -1,10 +1,18 @@
|
||||
import React from 'react'
|
||||
import { Router } from 'react-router'
|
||||
import { createBrowserHistory } from 'history'
|
||||
import { render } from 'react-testing-library'
|
||||
import Home from './Home'
|
||||
|
||||
const history = createBrowserHistory()
|
||||
|
||||
describe('Home', () => {
|
||||
it('renders without crashing', () => {
|
||||
const { container } = render(<Home history={''} />)
|
||||
const { container } = render(
|
||||
<Router history={history}>
|
||||
<Home history={history} />
|
||||
</Router>
|
||||
)
|
||||
expect(container.firstChild).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user