From 3f5cceb031deb6967cff798fe324c47dd403a898 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Tue, 8 Feb 2022 20:55:00 +0530 Subject: [PATCH] more filter parameters to neo4j * pass genres and instrument parameters to neo4j * remove filtering based on these params using rails and pg data * pass pagination offset to neo4j --- jam-ui/.env.development | 7 + .../integration/friends/friends-page.spec.js | 10 +- jam-ui/src/components/page/JKPeopleFilter.js | 4 +- ruby/.gitignore | 1 + ruby/lib/jam_ruby/models/base_search.rb | 7 +- ruby/lib/jam_ruby/models/musician_search.rb | 15 +- web/.gitignore | 1 + web/app/controllers/api_search_controller.rb | 183 ++++++++--- web/app/helpers/latency_helper.rb | 21 +- web/app/views/api_search/index.rabl | 294 +++++++++--------- web/spec/requests/musician_filter_api_spec.rb | 210 ++++++------- 11 files changed, 426 insertions(+), 327 deletions(-) create mode 100644 jam-ui/.env.development diff --git a/jam-ui/.env.development b/jam-ui/.env.development new file mode 100644 index 000000000..e92816d59 --- /dev/null +++ b/jam-ui/.env.development @@ -0,0 +1,7 @@ +HOST=beta.jamkazam.local +PORT=4000 +REACT_APP_ORIGIN=jamkazam.local +REACT_APP_LEGACY_BASE_URL=http://www.jamkazam.local:3000 +REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api +REACT_APP_BITBUCKET_BUILD_NUMBER=dev +REACT_APP_BITBUCKET_COMMIT=dev \ No newline at end of file diff --git a/jam-ui/cypress/integration/friends/friends-page.spec.js b/jam-ui/cypress/integration/friends/friends-page.spec.js index 9379ad025..0716c33bc 100644 --- a/jam-ui/cypress/integration/friends/friends-page.spec.js +++ b/jam-ui/cypress/integration/friends/friends-page.spec.js @@ -42,7 +42,7 @@ const closeSidePanel = () => { cy.get('[data-testid=profileSidePanel] .modal-header button.close').click(); }; -describe.only('Friends page without data', () => { +describe('Friends page without data', () => { beforeEach(() => { cy.stubAuthenticate(); cy.intercept('POST', /\S+\/filter/, { @@ -402,7 +402,7 @@ describe('Friends page with data', () => { }); cy.get('button') - .contains('Close') + .contains('Cancel') .should('not.be.disabled') .click(); }); @@ -454,7 +454,7 @@ describe('Friends page with data', () => { .click(); cy.get('[data-testid=textMessageModal]').within(() => { cy.get('button') - .contains('Close') + .contains('Cancel') .should('not.be.disabled') .click(); }); @@ -483,8 +483,8 @@ describe('Friends page with data', () => { cy.get('#selGenres') .type('Pop{enter}') .click(); - cy.get('#selLastActive').type('Within last 1 Day{enter}'); - cy.get('#selJoinedWithin').type('Within last 7 Day{enter}'); + //cy.get('#selLastActive').type('Within last 1 Day{enter}'); + //cy.get('#selJoinedWithin').type('Within last 7 Day{enter}'); }; beforeEach(() => { diff --git a/jam-ui/src/components/page/JKPeopleFilter.js b/jam-ui/src/components/page/JKPeopleFilter.js index b6f5c8444..918bbe3b2 100644 --- a/jam-ui/src/components/page/JKPeopleFilter.js +++ b/jam-ui/src/components/page/JKPeopleFilter.js @@ -358,7 +358,7 @@ function JKPeopleFilter() { )} /> -