Skip to content

Commit

Permalink
16621 - Added SP to legal types to search for (#2374)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
seeker25 and severinbeauvais authored Jun 23, 2023
1 parent f5128a2 commit c832d08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.2.2",
"version": "2.2.3",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion auth-web/src/services/business-lookup.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class BusinessLookupServices {
* @returns a promise to return the search results
*/
static async search (query: string, status = ''): Promise<BusinessLookupResultIF[]> {
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 : ''}`
Expand Down
6 changes: 3 additions & 3 deletions auth-web/tests/unit/services/business-lookup.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] } } })
)
Expand All @@ -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: [] } } })
)
Expand Down

0 comments on commit c832d08

Please sign in to comment.