mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-13 16:54:53 +01:00
test fix
This commit is contained in:
parent
5703cbecac
commit
6529636caf
@ -37,22 +37,26 @@ const ddo: Partial<DDO> = {
|
||||
{
|
||||
index: 0,
|
||||
contentType: 'csv',
|
||||
contentLength: '114000'
|
||||
contentLength: '114000',
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
contentType: 'excel',
|
||||
contentLength: '219000'
|
||||
contentLength: '219000',
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
contentType: 'csv',
|
||||
contentLength: '1300000'
|
||||
contentLength: '1300000',
|
||||
url: ''
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
contentType: 'csv',
|
||||
contentLength: '36300'
|
||||
contentLength: '36300',
|
||||
url: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -60,7 +64,6 @@ const ddo: Partial<DDO> = {
|
||||
description:
|
||||
'What a Waste is a global project to aggregate data on solid waste management from around the world. This database features the statistics collected through the effort, covering nearly all countries and over 330 cities. The metrics included cover all steps from the waste management value chain, including waste generation, composition, collection, and disposal, as well as information on user fees and financing, the informal sector, administrative structures, public communication, and legal information. The information presented is the best available based on a study of current literature and limited conversations with waste agencies and authorities. While there may be variations in the definitions and quality of reporting for individual data points, general trends should reflect the global reality. All sources and any estimations are noted.',
|
||||
copyrightHolder: 'World Bank Group',
|
||||
categories: ['Earth & Climate'],
|
||||
tags: ['Sustainability', ' Climate', ' Energy', ' ai-for-good'],
|
||||
links: [
|
||||
{
|
||||
@ -71,9 +74,9 @@ const ddo: Partial<DDO> = {
|
||||
deliveryType: 'files',
|
||||
termsAndConditions: true,
|
||||
dateRange: ['2018-09-20T08:38:58', '2019-12-11T05:19:42'],
|
||||
granularity: 'hourly',
|
||||
supportName: 'Jelly McJellyfish',
|
||||
supportEmail: 'jelly@oceanprotocol.com'
|
||||
supportEmail: 'jelly@oceanprotocol.com',
|
||||
access: 'Download'
|
||||
},
|
||||
curation: {
|
||||
numVotes: 100,
|
||||
|
@ -6,8 +6,6 @@ const testFormData: PublishFormDataInterface = {
|
||||
license: '',
|
||||
price: 0,
|
||||
title: '',
|
||||
granularity: 'hourly',
|
||||
category: 'test',
|
||||
summary: 'summary',
|
||||
termsAndConditions: true
|
||||
}
|
||||
|
@ -15,12 +15,7 @@ describe('Search', () => {
|
||||
totalResults: 200
|
||||
}
|
||||
const { container } = render(
|
||||
<Search
|
||||
text="Hello"
|
||||
categories={['Hello']}
|
||||
tag="Hello"
|
||||
queryResult={queryResult}
|
||||
/>
|
||||
<Search text="Hello" tag="Hello" queryResult={queryResult} />
|
||||
)
|
||||
expect(container.firstChild).toBeInTheDocument()
|
||||
|
||||
@ -55,12 +50,7 @@ describe('Search', () => {
|
||||
totalResults: 0
|
||||
}
|
||||
const { container } = render(
|
||||
<Search
|
||||
text="Hello"
|
||||
categories={['Hello']}
|
||||
tag="Hello"
|
||||
queryResult={queryResult}
|
||||
/>
|
||||
<Search text="Hello" tag="Hello" queryResult={queryResult} />
|
||||
)
|
||||
expect(container.querySelector('.empty')).toBeInTheDocument()
|
||||
})
|
||||
@ -72,14 +62,12 @@ describe('Search.getInitialProps', () => {
|
||||
context: Partial<NextPageContext>
|
||||
) => {
|
||||
text: string
|
||||
categories: string[]
|
||||
tag: string
|
||||
queryResult: QueryResult
|
||||
}
|
||||
const context = {
|
||||
query: {
|
||||
text: 'text',
|
||||
categories: '["category"]',
|
||||
tag: 'tag',
|
||||
page: '1',
|
||||
offset: '1'
|
||||
@ -87,7 +75,6 @@ describe('Search.getInitialProps', () => {
|
||||
}
|
||||
const props = await getInitialProps(context)
|
||||
expect(props.text).toEqual('text')
|
||||
expect(props.categories).toEqual(['category'])
|
||||
expect(props.tag).toEqual('tag')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user