From 417abf898896dd6e61b00785b1f47da2c1a40591 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 14 Nov 2019 13:16:53 +0100 Subject: [PATCH] search tweaks --- client/src/components/organisms/AssetsLatest.tsx | 2 +- client/src/components/organisms/ChannelTeaser.tsx | 2 +- client/src/components/templates/Channel.tsx | 2 +- client/src/context/MarketProvider.tsx | 2 +- client/src/routes/Search.tsx | 2 +- cypress/integration/2_search.spec.js | 2 +- package-lock.json | 6 +++--- package.json | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/components/organisms/AssetsLatest.tsx b/client/src/components/organisms/AssetsLatest.tsx index 98878b0..a705309 100644 --- a/client/src/components/organisms/AssetsLatest.tsx +++ b/client/src/components/organisms/AssetsLatest.tsx @@ -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 diff --git a/client/src/components/organisms/ChannelTeaser.tsx b/client/src/components/organisms/ChannelTeaser.tsx index d36d7e9..f419dae 100644 --- a/client/src/components/organisms/ChannelTeaser.tsx +++ b/client/src/components/organisms/ChannelTeaser.tsx @@ -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 diff --git a/client/src/components/templates/Channel.tsx b/client/src/components/templates/Channel.tsx index 47ee36e..a0b25fe 100644 --- a/client/src/components/templates/Channel.tsx +++ b/client/src/components/templates/Channel.tsx @@ -68,7 +68,7 @@ export default class Channel extends PureComponent { } try { - const search = await ocean.aquarius.queryMetadata(searchQuery) + const search = await ocean.assets.query(searchQuery) this.setState({ results: search.results, totalResults: search.totalResults, diff --git a/client/src/context/MarketProvider.tsx b/client/src/context/MarketProvider.tsx index 15e029a..e7f581b 100644 --- a/client/src/context/MarketProvider.tsx +++ b/client/src/context/MarketProvider.tsx @@ -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) diff --git a/client/src/routes/Search.tsx b/client/src/routes/Search.tsx index d7b0594..40586bd 100644 --- a/client/src/routes/Search.tsx +++ b/client/src/routes/Search.tsx @@ -90,7 +90,7 @@ class Search extends PureComponent { } try { - const search = await ocean.aquarius.queryMetadata(searchQuery) + const search = await ocean.assets.query(searchQuery) this.setState({ results: search.results, totalResults: search.totalResults, diff --git a/cypress/integration/2_search.spec.js b/cypress/integration/2_search.spec.js index e41695f..1c65f2d 100644 --- a/cypress/integration/2_search.spec.js +++ b/cypress/integration/2_search.spec.js @@ -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') diff --git a/package-lock.json b/package-lock.json index f72c7d0..df5a94a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 0eecb8d..ff74c32 100644 --- a/package.json +++ b/package.json @@ -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",