This repository has been archived by the owner on Nov 21, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
129 changed files
with
5,436 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,9 +184,18 @@ describe('companyQueries', () => { | |
}); | ||
|
||
test('Companies filtered by search value', async () => { | ||
await companyFactory({ names: [name], primaryName: name }); | ||
await companyFactory({ plan }); | ||
await companyFactory({ industry: 'Banks' }); | ||
const phone = '99999999'; | ||
const email = '[email protected]'; | ||
const website = 'www.google.com'; | ||
|
||
await companyFactory({ | ||
names: [name], | ||
plan, | ||
industry: 'Banks', | ||
website, | ||
emails: [email], | ||
phones: [phone], | ||
}); | ||
|
||
// companies by name ============== | ||
let responses = await graphqlRequest(qryCompanies, 'companies', { | ||
|
@@ -208,6 +217,27 @@ describe('companyQueries', () => { | |
}); | ||
|
||
expect(responses.length).toBe(1); | ||
|
||
// companies by website ============== | ||
responses = await graphqlRequest(qryCompanies, 'companies', { | ||
searchValue: website, | ||
}); | ||
|
||
expect(responses.length).toBe(1); | ||
|
||
// companies by email ============== | ||
responses = await graphqlRequest(qryCompanies, 'companies', { | ||
searchValue: email, | ||
}); | ||
|
||
expect(responses.length).toBe(1); | ||
|
||
// companies by phone ============== | ||
responses = await graphqlRequest(qryCompanies, 'companies', { | ||
searchValue: phone, | ||
}); | ||
|
||
expect(responses.length).toBe(1); | ||
}); | ||
|
||
test('Companies filtered by brandId', async () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.