mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
search tweaks
This commit is contained in:
parent
ed33f690f9
commit
417abf8988
@ -37,7 +37,7 @@ export default class AssetsLatest extends PureComponent<{}, AssetsLatestState> {
|
||||
}
|
||||
|
||||
try {
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
const search = await ocean.assets.query(searchQuery)
|
||||
this.setState({
|
||||
latestAssets: search.results,
|
||||
isLoadingLatest: false
|
||||
|
@ -52,7 +52,7 @@ export default class ChannelTeaser extends Component<
|
||||
}
|
||||
|
||||
try {
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
const search = await ocean.assets.query(searchQuery)
|
||||
this.setState({
|
||||
channelAssets: search.results,
|
||||
isLoadingChannel: false
|
||||
|
@ -68,7 +68,7 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
|
||||
}
|
||||
|
||||
try {
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
const search = await ocean.assets.query(searchQuery)
|
||||
this.setState({
|
||||
results: search.results,
|
||||
totalResults: search.totalResults,
|
||||
|
@ -59,7 +59,7 @@ export default class MarketProvider extends PureComponent<
|
||||
|
||||
try {
|
||||
const { ocean } = this.props
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
const search = await ocean.assets.query(searchQuery)
|
||||
this.setState({ totalAssets: search.totalResults })
|
||||
} catch (error) {
|
||||
Logger.error('Error', error.message)
|
||||
|
@ -90,7 +90,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
|
||||
}
|
||||
|
||||
try {
|
||||
const search = await ocean.aquarius.queryMetadata(searchQuery)
|
||||
const search = await ocean.assets.query(searchQuery)
|
||||
this.setState({
|
||||
results: search.results,
|
||||
totalResults: search.totalResults,
|
||||
|
@ -8,7 +8,7 @@ describe('Search', () => {
|
||||
|
||||
it('should search for assets from homepage', () => {
|
||||
// Fill search phrase
|
||||
cy.get('input#search').type('Title test')
|
||||
cy.get('input#search').type('Commons Integration Test')
|
||||
// Start search
|
||||
cy.get('button')
|
||||
.contains('Search')
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -1683,9 +1683,9 @@
|
||||
}
|
||||
},
|
||||
"cypress": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.6.0.tgz",
|
||||
"integrity": "sha512-ODhbOrH1XZx0DUoYmJSvOSbEQjycNOpFYe7jOnHkT1+sdsn2+uqwAjZ1x982q3H4R/5iZjpSd50gd/iw2bofzg==",
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.6.1.tgz",
|
||||
"integrity": "sha512-6n0oqENdz/oQ7EJ6IgESNb2M7Bo/70qX9jSJsAziJTC3kICfEMmJUlrAnP9bn+ut24MlXQST5nRXhUP5nRIx6A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@cypress/listr-verbose-renderer": "0.4.1",
|
||||
|
@ -29,7 +29,7 @@
|
||||
"@typescript-eslint/parser": "^1.6.0",
|
||||
"auto-changelog": "^1.16.2",
|
||||
"concurrently": "^5.0.0",
|
||||
"cypress": "^3.6.0",
|
||||
"cypress": "^3.6.1",
|
||||
"cypress-log-to-output": "^1.0.7",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-oceanprotocol": "1.4.0",
|
||||
|
Loading…
Reference in New Issue
Block a user