-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(QualificationModal): Add search bar
- Loading branch information
Showing
5 changed files
with
73 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { searchOptionsFn } from './helpers' | ||
|
||
describe('searchOptionsFn', () => { | ||
it('should return only the uniq good result', () => { | ||
const options = { | ||
children: [ | ||
{ id: 'none', title: 'None' }, | ||
{ | ||
id: 'theme1', | ||
title: 'Identity', | ||
children: [ | ||
{ id: '01', title: 'Identity Photo' }, | ||
{ id: '02', title: 'ID card' } | ||
] | ||
}, | ||
{ | ||
id: 'theme2', | ||
title: 'Family', | ||
children: [ | ||
{ id: '03', title: 'Family record book' }, | ||
{ id: '04', title: 'Birth certificate' }, | ||
{ id: '01', title: 'Identity Photo' } | ||
] | ||
} | ||
] | ||
} | ||
|
||
const res = searchOptionsFn(options, 'photo') | ||
|
||
expect(res).toStrictEqual([{ id: '01', title: 'Identity Photo' }]) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"QualificationModal": { | ||
"title": "Document type" | ||
"title": "Document type", | ||
"noDataLabel": "No result" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"QualificationModal": { | ||
"title": "Type de document" | ||
"title": "Type de document", | ||
"noDataLabel": "Aucun résultat" | ||
} | ||
} |