1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

search tweaks

This commit is contained in:
Matthias Kretschmann 2019-11-14 13:16:53 +01:00
parent ed33f690f9
commit 417abf8988
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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)

View File

@ -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,

View File

@ -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
View File

@ -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",

View File

@ -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",