From c832d083ca738d8c297ff8f5364a214d0ba5dae5 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 23 Jun 2023 15:24:27 -0700 Subject: [PATCH] 16621 - Added SP to legal types to search for (#2374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update business-lookup.services.ts - added entity type "SP" - sorted the list * - app version = 2.2.3 (#2373) - added entity type "SP" - sorted the list - updated unit tests --------- Co-authored-by: Séverin Beauvais --- auth-web/package-lock.json | 4 ++-- auth-web/package.json | 2 +- auth-web/src/services/business-lookup.services.ts | 2 +- .../tests/unit/services/business-lookup.service.spec.ts | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index 1f5ff70edc..0e98fe2b37 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.2.2", + "version": "2.2.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.2.2", + "version": "2.2.3", "dependencies": { "@bcrs-shared-components/bread-crumb": "^1.0.2", "@bcrs-shared-components/corp-type-module": "1.0.12", diff --git a/auth-web/package.json b/auth-web/package.json index 31620bf2f5..b8e0acc9e8 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.2.2", + "version": "2.2.3", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, diff --git a/auth-web/src/services/business-lookup.services.ts b/auth-web/src/services/business-lookup.services.ts index 90c0b293cd..2c2b656211 100644 --- a/auth-web/src/services/business-lookup.services.ts +++ b/auth-web/src/services/business-lookup.services.ts @@ -35,7 +35,7 @@ export default class BusinessLookupServices { * @returns a promise to return the search results */ static async search (query: string, status = ''): Promise { - const legalType = 'BC,A,ULC,C,S,XP,GP,LP,CUL,XS,LLC,LL,BEN,CP,CC,XL,FI,XCP,PA' + const legalType = 'A,BC,BEN,C,CC,CP,CUL,FI,GP,LL,LLC,LP,PA,S,SP,ULC,XCP,XL,XP,XS' let url = this.registriesSearchApiUrl + 'businesses/search/facets?start=0&rows=20' url += `&categories=legalType:${legalType}${status ? '::status:' + status : ''}` diff --git a/auth-web/tests/unit/services/business-lookup.service.spec.ts b/auth-web/tests/unit/services/business-lookup.service.spec.ts index fcdae454c0..9c143dee62 100644 --- a/auth-web/tests/unit/services/business-lookup.service.spec.ts +++ b/auth-web/tests/unit/services/business-lookup.service.spec.ts @@ -17,7 +17,7 @@ describe('Business Lookup Services', () => { // mock successsful search const args = `${BUSINESS_SEARCH_URL}businesses/search/facets?start=0&rows=20&categories=legalType:` + - `BC,A,ULC,C,S,XP,GP,LP,CUL,XS,LLC,LL,BEN,CP,CC,XL,FI,XCP,PA&query=value:FM1000002` + `A,BC,BEN,C,CC,CP,CUL,FI,GP,LL,LLC,LP,PA,S,SP,ULC,XCP,XL,XP,XS&query=value:FM1000002` sinon.stub(axios, 'get').withArgs(args).returns( Promise.resolve({ data: { searchResults: { results: [result] } } }) ) @@ -32,8 +32,8 @@ describe('Business Lookup Services', () => { it('does not return a result when the business is not found', async () => { // mock unsuccesssful search - const args = `${BUSINESS_SEARCH_URL}businesses/search/facets?start=0&rows=20&categories=legalType` + - `:BC,A,ULC,C,S,XP,GP,LP,CUL,XS,LLC,LL,BEN,CP,CC,XL,FI,XCP,PA&query=value:FM1000003` + const args = `${BUSINESS_SEARCH_URL}businesses/search/facets?start=0&rows=20&categories=legalType:` + + `A,BC,BEN,C,CC,CP,CUL,FI,GP,LL,LLC,LP,PA,S,SP,ULC,XCP,XL,XP,XS&query=value:FM1000003` sinon.stub(axios, 'get').withArgs(args).returns( Promise.resolve({ data: { searchResults: { results: [] } } }) )