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 { try {
const search = await ocean.aquarius.queryMetadata(searchQuery) const search = await ocean.assets.query(searchQuery)
this.setState({ this.setState({
latestAssets: search.results, latestAssets: search.results,
isLoadingLatest: false isLoadingLatest: false

View File

@ -52,7 +52,7 @@ export default class ChannelTeaser extends Component<
} }
try { try {
const search = await ocean.aquarius.queryMetadata(searchQuery) const search = await ocean.assets.query(searchQuery)
this.setState({ this.setState({
channelAssets: search.results, channelAssets: search.results,
isLoadingChannel: false isLoadingChannel: false

View File

@ -68,7 +68,7 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
} }
try { try {
const search = await ocean.aquarius.queryMetadata(searchQuery) const search = await ocean.assets.query(searchQuery)
this.setState({ this.setState({
results: search.results, results: search.results,
totalResults: search.totalResults, totalResults: search.totalResults,

View File

@ -59,7 +59,7 @@ export default class MarketProvider extends PureComponent<
try { try {
const { ocean } = this.props const { ocean } = this.props
const search = await ocean.aquarius.queryMetadata(searchQuery) const search = await ocean.assets.query(searchQuery)
this.setState({ totalAssets: search.totalResults }) this.setState({ totalAssets: search.totalResults })
} catch (error) { } catch (error) {
Logger.error('Error', error.message) Logger.error('Error', error.message)

View File

@ -90,7 +90,7 @@ class Search extends PureComponent<SearchProps, SearchState> {
} }
try { try {
const search = await ocean.aquarius.queryMetadata(searchQuery) const search = await ocean.assets.query(searchQuery)
this.setState({ this.setState({
results: search.results, results: search.results,
totalResults: search.totalResults, totalResults: search.totalResults,

View File

@ -8,7 +8,7 @@ describe('Search', () => {
it('should search for assets from homepage', () => { it('should search for assets from homepage', () => {
// Fill search phrase // Fill search phrase
cy.get('input#search').type('Title test') cy.get('input#search').type('Commons Integration Test')
// Start search // Start search
cy.get('button') cy.get('button')
.contains('Search') .contains('Search')

6
package-lock.json generated
View File

@ -1683,9 +1683,9 @@
} }
}, },
"cypress": { "cypress": {
"version": "3.6.0", "version": "3.6.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.6.0.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.6.1.tgz",
"integrity": "sha512-ODhbOrH1XZx0DUoYmJSvOSbEQjycNOpFYe7jOnHkT1+sdsn2+uqwAjZ1x982q3H4R/5iZjpSd50gd/iw2bofzg==", "integrity": "sha512-6n0oqENdz/oQ7EJ6IgESNb2M7Bo/70qX9jSJsAziJTC3kICfEMmJUlrAnP9bn+ut24MlXQST5nRXhUP5nRIx6A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/listr-verbose-renderer": "0.4.1", "@cypress/listr-verbose-renderer": "0.4.1",

View File

@ -29,7 +29,7 @@
"@typescript-eslint/parser": "^1.6.0", "@typescript-eslint/parser": "^1.6.0",
"auto-changelog": "^1.16.2", "auto-changelog": "^1.16.2",
"concurrently": "^5.0.0", "concurrently": "^5.0.0",
"cypress": "^3.6.0", "cypress": "^3.6.1",
"cypress-log-to-output": "^1.0.7", "cypress-log-to-output": "^1.0.7",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-config-oceanprotocol": "1.4.0", "eslint-config-oceanprotocol": "1.4.0",